summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-11-18 08:46:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-11-18 10:22:44 +0100
commit6fa1161d3113d43f38acdf9207627659fbc137c8 (patch)
tree0b4e0091101fde23515ec7ab9bb7a05993c40482 /sw/source
parent7938cae5178a4ce4093fd6494a058ab879ba303b (diff)
loplugin:stringviewparam: No good reason to exclude operator functions
(at least not in general) Change-Id: I71337b53dc9735e90a37ee532d0a8a08797b518c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106043 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx3
-rw-r--r--sw/source/filter/ww8/ww8par.hxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 99cd7eabd6c4..ad61fc767b41 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -150,6 +150,7 @@
#include <algorithm>
#include <stdarg.h>
+#include <string_view>
#include <toolkit/helper/vclunohelper.hxx>
#include <unicode/regex.h>
@@ -6288,7 +6289,7 @@ namespace {
/// Functor to do case-insensitive ordering of OUString instances.
struct OUStringIgnoreCase
{
- bool operator() (const OUString& lhs, const OUString& rhs) const
+ bool operator() (const OUString& lhs, std::u16string_view rhs) const
{
return lhs.compareToIgnoreAsciiCase(rhs) < 0;
}
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 3bfb20310ecd..07beb3592bff 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -30,6 +30,7 @@
#include <vector>
#include <stack>
+#include <string_view>
#include <deque>
#include <map>
#include <utility>
@@ -441,7 +442,7 @@ namespace SwWW8
{
struct ltstr
{
- bool operator()(const OUString &r1, const OUString &r2) const
+ bool operator()(const OUString &r1, std::u16string_view r2) const
{
return r1.compareToIgnoreAsciiCase(r2)<0;
}