jvmfwk/plugins/sunmajor/pluginlib/util.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 7e819f20f36ed0208ad9a46bdccbdb52fb353b54 Author: Stephan Bergmann <[email protected]> Date: Wed Nov 16 23:40:25 2016 +0100 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 (cherry picked from commit 36a329b6395257d7df2013d23ba4205a5ef72f4d) Reviewed-on: https://gerrit.libreoffice.org/30923 Tested-by: Jenkins <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Caolán McNamara <[email protected]> diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx index f1d33b1..98883e9 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;
_______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
