diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-09-21 09:35:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-09-21 13:28:48 +0200 |
commit | f6afdd94def385c2851f92dd39a3197e540494f4 (patch) | |
tree | a6d3094e0825b0b238439783246359d26e9bbf49 /unotools | |
parent | 02aeec651ac3b09d42d1c05832c274c8d941b36c (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.cxx | 4 |
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() ); |