Kaydet (Commit) 36a329b6 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Fix regression in bubbleSortVersion

...introduced with 789055bc "clang-tidy
performance-unnecessary-copy-initialization" (so partially revert it).  Whatever
clang-tidy erroneously reported there, cur and next are lvalue references into
vec, so this attempted copy now actually overwrote one with the other.  The
result was that if multiple JREs are detected on the system, "Options -
LibreOffice - Advanced" would list a single one multiple times.

Change-Id: I7ef454c0f37669722812383848602dc2bacf7cd1
üst 36c8fd89
......@@ -731,8 +731,9 @@ void bubbleSortVersion(vector<rtl::Reference<VendorBase> >& vec)
}
if(nCmp == 1) // cur > next
{
rtl::Reference<VendorBase> less = next;
vec.at(j-1)= cur;
vec.at(j)= next;
vec.at(j)= less;
}
}
++cIter;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment