diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-11-16 23:40:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-16 23:47:09 +0100 |
commit | 36a329b6395257d7df2013d23ba4205a5ef72f4d (patch) | |
tree | d655cd274086babeabe42bd0f99de610e289da96 /jvmfwk | |
parent | 36c8fd8995f4e1c8439a69dde1f55e45e674d7b2 (diff) |
Fix regression in bubbleSortVersion
...introduced with 789055bc2acb4c71483fd60ea258d158bd5aec10 "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
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index 153a9399fb07..d1a0088f1510 100644 --- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx +++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx @@ -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; |