comphelper/source/misc/servicedecl.cxx |    2 +-
 cppuhelper/source/shlib.cxx            |    2 +-
 include/o3tl/string_view.hxx           |    9 +--------
 3 files changed, 3 insertions(+), 10 deletions(-)

New commits:
commit 4c288a18e7052de2a42d25ca04c0cda7badf9f95
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Apr 11 17:56:56 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Apr 12 08:23:54 2023 +0200

    fix o3tl::equalsAsciiL
    
    after I got it wrong in both the original commit
        commit d15a6560bd445cd1931e9fded6ad8ecfdd54211b
        use more string_view
    and in the attempted fix
        commit dd41ea3ec1f579fabb9f674184b52c1be77e2fdb
        fix for o3tl::equalsAscii
    thanks to sberg for spotting that
    
    Change-Id: Iff12879de823553b2623db48979e9a720302f2d7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150240
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/comphelper/source/misc/servicedecl.cxx 
b/comphelper/source/misc/servicedecl.cxx
index 5f691014d39c..2b16539d1a55 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::equalsAsciiL(name, token))
+        if (o3tl::equalsAscii(name, token))
             return true;
     }
     while (nIndex >= 0);
diff --git a/cppuhelper/source/shlib.cxx b/cppuhelper/source/shlib.cxx
index b49c5eebfc15..b270c62c5cb4 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::equalsAsciiL(implementation, imp))
+                if (o3tl::equalsAscii(implementation, imp))
                 {
                     n += ":log";
                     break;
diff --git a/include/o3tl/string_view.hxx b/include/o3tl/string_view.hxx
index 79d6eba702a1..2ccc4f828a03 100644
--- a/include/o3tl/string_view.hxx
+++ b/include/o3tl/string_view.hxx
@@ -22,7 +22,7 @@
 
 namespace o3tl
 {
-// Like OUString::equalsAscii, but for std::u16string_view:
+// Like OUString::equalsAscii/OUString::equalsAsciiL, but for 
std::u16string_view:
 inline bool equalsAscii(std::u16string_view s1, std::string_view s2)
 {
     return s1.size() == s2.size()
@@ -30,13 +30,6 @@ inline bool equalsAscii(std::u16string_view s1, 
std::string_view s2)
                   == 0;
 }
 
-// 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;
-}
-
 // Like OUString::equalsIgnoreAsciiCase, but for two std::u16string_view:
 inline bool equalsIgnoreAsciiCase(std::u16string_view s1, std::u16string_view 
s2)
 {

Reply via email to