diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-03-11 19:24:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-03-12 11:16:40 +0100 |
commit | 3d48db236e5e12460999fa8554d58e08a8f0f6df (patch) | |
tree | 30eaa30495fdc31f51a0c330385b5b4b1f1ee259 | |
parent | 15c097010f1567d933abf046bc43447bd7415e4c (diff) |
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.grandin@collabora.co.uk>
-rw-r--r-- | tools/source/fsys/wldcrd.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
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 } } |