diff options
author | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-08 23:31:11 +0100 |
---|---|---|
committer | Stephan Bergmann <stephan.bergmann@allotropia.de> | 2024-03-09 19:19:04 +0100 |
commit | 3ba85b7786663da4f2de1a3c2fe7ee9a27657293 (patch) | |
tree | 31052009f6f30e919d7220b07d8b2bc84074e327 /tools | |
parent | 959b30841ae9c5cc1f43928f5e7780abaab4a087 (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 'tools')
-rw-r--r-- | tools/source/misc/json_writer.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/source/misc/json_writer.cxx b/tools/source/misc/json_writer.cxx index 0ffc5cb903f9..b9f62d2b4b60 100644 --- a/tools/source/misc/json_writer.cxx +++ b/tools/source/misc/json_writer.cxx @@ -10,6 +10,7 @@ #include <tools/json_writer.hxx> #include <o3tl/string_view.hxx> #include <stdio.h> +#include <cstddef> #include <cstring> #include <rtl/math.hxx> @@ -137,8 +138,8 @@ void JsonWriter::writeEscapedOUString(std::u16string_view rPropVal) ++mPos; // Convert from UTF-16 to UTF-8 and perform escaping - sal_Int32 i = 0; - while (i < static_cast<sal_Int32>(rPropVal.size())) + std::size_t i = 0; + while (i < rPropVal.size()) { sal_uInt32 ch = o3tl::iterateCodePoints(rPropVal, &i); if (writeEscapedSequence(ch, mPos)) |