From 3ba85b7786663da4f2de1a3c2fe7ee9a27657293 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 8 Mar 2024 23:31:11 +0100 Subject: 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 --- configmgr/source/access.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'configmgr') 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 #include +#include #include #include #include @@ -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(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 -- cgit v1.2.3