summaryrefslogtreecommitdiff
path: root/include/comphelper
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-09 22:42:32 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-09 23:31:17 +0100
commitdf810a82058a07dd8b1c2268955d64328e53cf97 (patch)
tree060003d876f4aad232475144e1df1ca65d7cc7c5 /include/comphelper
parentff8d82dc4cc0841f11ad6d51d3ed37450a6f6971 (diff)
Fix loplugin:stringviewparam handling of comparison operators
Change-Id: I58456efb9588b544d998ac6a4c27d55457280742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107510 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/comphelper')
-rw-r--r--include/comphelper/stl_types.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx
index 3b5a991eb4e3..891463253dc5 100644
--- a/include/comphelper/stl_types.hxx
+++ b/include/comphelper/stl_types.hxx
@@ -22,6 +22,7 @@
#include <sal/config.h>
#include <memory>
+#include <string_view>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
@@ -55,7 +56,7 @@ class UStringMixEqual
public:
UStringMixEqual(bool bCaseSensitive = true):m_bCaseSensitive(bCaseSensitive){}
- bool operator() (const OUString& lhs, const OUString& rhs) const
+ bool operator() (const OUString& lhs, std::u16string_view rhs) const
{
return m_bCaseSensitive ? lhs == rhs : lhs.equalsIgnoreAsciiCase( rhs );
}