diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-18 10:10:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-02-18 11:04:27 +0100 |
commit | c7f5da8b04f6e3d69953e38cb3f3bde86104d85a (patch) | |
tree | 08f46bc3ff1eaa11e9fd28cc5b683e5eeff971bc /toolkit/source | |
parent | 414cd8b6582ab6aea69c96f70f0594a51eb0665d (diff) |
fix comparison of std::lower_bound result
turns out using a compare operator that takes something other than the
element type as a parameter is really hard to get right.
The changes in:
basic/source/classes/propacc.cxx
comphelper/source/property/propagg.cxx
vcl/source/font/font.cxx
are a regression from
commit 35e80e9726b5fee6a00caa58349a4b5d924dad7c
Date: Fri Oct 19 16:01:19 2018 +0200
when calling std::lower_bound
The change in
toolkit/source/awt/vclxtoolkit.cxx
is a regression from
commit 76dd28afc9c0eb632a5dd20eb51704ee0bbc4b58
Date: Tue Oct 9 16:27:11 2018 +0200
loplugin:staticvar in various
Change-Id: Icf6db22e1fc091517a53dd3624913c8c2071c106
Reviewed-on: https://gerrit.libreoffice.org/67954
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit/source')
-rw-r--r-- | toolkit/source/awt/vclxtoolkit.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index fc46f5d3c51a..f0e000146e1f 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -791,7 +791,8 @@ WindowType ImplGetComponentType( const OUString& rServiceName ) auto it = std::lower_bound( std::begin(aComponentInfos), std::end(aComponentInfos), sSearch, ComponentInfoFindCompare ); - if (it != std::end(aComponentInfos) && !ComponentInfoFindCompare(*it, sSearch) ) + if (it != std::end(aComponentInfos) && + rtl_ustr_ascii_compareIgnoreAsciiCase_WithLengths(sSearch.pData->buffer, sSearch.pData->length, it->sName.data, it->sName.size) == 0) return it->nWinType; return WindowType::NONE; } |