summaryrefslogtreecommitdiff
path: root/configmgr
diff options
context:
space:
mode:
authorStephan Bergmann <stephan.bergmann@allotropia.de>2024-03-08 23:31:11 +0100
committerStephan Bergmann <stephan.bergmann@allotropia.de>2024-03-09 19:19:04 +0100
commit3ba85b7786663da4f2de1a3c2fe7ee9a27657293 (patch)
tree31052009f6f30e919d7220b07d8b2bc84074e327 /configmgr
parent959b30841ae9c5cc1f43928f5e7780abaab4a087 (diff)
Support o3tl::iterateCodePoints with both sal_Int32 and std::size_t
...and clean up the most gross casting offenses Change-Id: If0d646fb3e73e71a9a2735569395034973563a1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Diffstat (limited to 'configmgr')
-rw-r--r--configmgr/source/access.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/configmgr/source/access.cxx b/configmgr/source/access.cxx
index c25cf73aaef0..44a47e74b331 100644
--- a/configmgr/source/access.cxx
+++ b/configmgr/source/access.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <cassert>
+#include <cstddef>
#include <cstdlib>
#include <utility>
#include <vector>
@@ -111,7 +112,7 @@ namespace {
// surrogates, even though they should not appear in well-formed UNO OUString
// instances anyway), or is a slash (as it causes problems in path syntax):
bool isValidName(std::u16string_view name, bool setMember) {
- for (sal_Int32 i = 0; i != static_cast<sal_Int32>(name.size());) {
+ for (std::size_t i = 0; i != name.size();) {
sal_uInt32 c = o3tl::iterateCodePoints(name, &i);
if ((c < 0x20 && !(c == 0x09 || c == 0x0A || c == 0x0D))
|| rtl::isSurrogate(c) || c == 0xFFFE || c == 0xFFFF