Kaydet (Commit) 7e819f20 authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Caolán McNamara

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
(cherry picked from commit 36a329b6)
Reviewed-on: https://gerrit.libreoffice.org/30923Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst d1909ab7
......@@ -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