tools/source/fsys/wldcrd.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 3d48db236e5e12460999fa8554d58e08a8f0f6df
Author:     Noel Grandin <noelgran...@gmail.com>
AuthorDate: Fri Mar 11 19:24:12 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Mar 12 11:16:40 2022 +0100

    no need to temporary OUString here
    
    Change-Id: Iffd95fcf4fd1f9aac0ba77effc3c63eedce69adf
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131412
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/tools/source/fsys/wldcrd.cxx b/tools/source/fsys/wldcrd.cxx
index a9867c00ba51..8d314001627b 100644
--- a/tools/source/fsys/wldcrd.cxx
+++ b/tools/source/fsys/wldcrd.cxx
@@ -92,18 +92,18 @@ bool WildCard::ImpMatch( std::u16string_view aWild, 
std::u16string_view aStr )
 
 bool WildCard::Matches( std::u16string_view rString ) const
 {
-    OUString aTmpWild = aWildString;
+    std::u16string_view aTmpWild = aWildString;
 
-    sal_Int32 nSepPos;
+    size_t nSepPos;
 
     if ( cSepSymbol != '\0' )
     {
-        while ( (nSepPos = aTmpWild.indexOf(cSepSymbol)) != -1 )
+        while ( (nSepPos = aTmpWild.find(cSepSymbol)) != 
std::u16string_view::npos )
         {
             // Check all split wildcards
-            if ( ImpMatch( aTmpWild.subView( 0, nSepPos ), rString ) )
+            if ( ImpMatch( aTmpWild.substr( 0, nSepPos ), rString ) )
                 return true;
-            aTmpWild = aTmpWild.copy(nSepPos + 1); // remove separator
+            aTmpWild = aTmpWild.substr(nSepPos + 1); // remove separator
         }
     }
 

Reply via email to