From df810a82058a07dd8b1c2268955d64328e53cf97 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 9 Dec 2020 22:42:32 +0100 Subject: 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 --- include/comphelper/stl_types.hxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/comphelper') 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 #include +#include #include #include @@ -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 ); } -- cgit