summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-04-11 10:27:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-04-11 13:29:45 +0200
commitdd41ea3ec1f579fabb9f674184b52c1be77e2fdb (patch)
tree8663849aef8eaecbbd0f007a50a30c1aa71e9a9e
parentc0e82975c21d702f962784ee5ddb7435e6d7c922 (diff)
fix for o3tl::equalsAscii
from commit d15a6560bd445cd1931e9fded6ad8ecfdd54211b use more string_view where the new method was named incorrectly Change-Id: Ia4513fa67f5bda8b6cb56e3db22df48b5e3c7283 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150217 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--comphelper/source/misc/servicedecl.cxx2
-rw-r--r--cppuhelper/source/shlib.cxx2
-rw-r--r--include/o3tl/string_view.hxx4
3 files changed, 4 insertions, 4 deletions
diff --git a/comphelper/source/misc/servicedecl.cxx b/comphelper/source/misc/servicedecl.cxx
index 2b16539d1a55..5f691014d39c 100644
--- a/comphelper/source/misc/servicedecl.cxx
+++ b/comphelper/source/misc/servicedecl.cxx
@@ -131,7 +131,7 @@ bool ServiceDecl::supportsService( std::u16string_view name ) const
sal_Int32 nIndex = 0;
do {
std::string_view const token( o3tl::getToken(str, 0, cDelim, nIndex ) );
- if (o3tl::equalsAscii(name, token))
+ if (o3tl::equalsAsciiL(name, token))
return true;
}
while (nIndex >= 0);
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index b270c62c5cb4..b49c5eebfc15 100644
--- a/cppuhelper/source/shlib.cxx
+++ b/cppuhelper/source/shlib.cxx
@@ -57,7 +57,7 @@ css::uno::Environment cppuhelper::detail::getEnvironment(
for (sal_Int32 i = 0; i != -1;) {
std::string_view imp(o3tl::getToken(imps, 0, ';', i));
//TODO: this assumes UNO_ENV_LOG only contains ASCII characters:
- if (o3tl::equalsAscii(implementation, imp))
+ if (o3tl::equalsAsciiL(implementation, imp))
{
n += ":log";
break;
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
index f6c2a4aa72b9..bdb554babf27 100644
--- a/include/o3tl/string_view.hxx
+++ b/include/o3tl/string_view.hxx
@@ -28,8 +28,8 @@ inline bool equalsAscii(std::u16string_view s1, const char* s2)
return rtl_ustr_ascii_compare_WithLength(s1.data(), s1.size(), s2) == 0;
}
-// Like OUString::equalsAsciiL
-inline bool equalsAscii(std::u16string_view s1, std::string_view s2)
+// Like OUString::equalsAsciiL, but for std::u16string_view:
+inline bool equalsAsciiL(std::u16string_view s1, std::string_view s2)
{
return rtl_ustr_ascii_shortenedCompare_WithLength(s1.data(), s1.size(), s2.data(), s2.size())
== 0;