summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-21 09:35:00 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-21 13:28:48 +0200
commitf6afdd94def385c2851f92dd39a3197e540494f4 (patch)
treea6d3094e0825b0b238439783246359d26e9bbf49 /unotools
parent02aeec651ac3b09d42d1c05832c274c8d941b36c (diff)
bogus OSL_ASSERT: nPos != std::u16string_view::npos ... warnings
since: commit 5edefc801fb48559c8064003f23d22d838710ee4 Date: Tue Sep 20 11:37:12 2022 +0200 use more string_view in unotools Change-Id: I095de3a1156613e95c96ad0d1375885e8f36d61c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140312 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/config/configpaths.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/unotools/source/config/configpaths.cxx b/unotools/source/config/configpaths.cxx
index 1b3518c39f7a..d3813f31fcf5 100644
--- a/unotools/source/config/configpaths.cxx
+++ b/unotools/source/config/configpaths.cxx
@@ -125,8 +125,8 @@ bool splitLastFromConfigurationPath(std::u16string_view _sInPath,
nPos = _sInPath.rfind('/',nEnd);
nStart = nPos + 1;
}
- OSL_ASSERT( nPos != std::u16string_view::npos &&
- nPos < nStart &&
+ OSL_ASSERT( (nPos == std::u16string_view::npos ||
+ nPos < nStart) &&
nStart < nEnd &&
nEnd <= _sInPath.size() );