summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-05-05 12:07:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-05-06 12:09:48 +0200
commit325c571c22231978e5409902b514d2584186e0a0 (patch)
treec6d84fedf6dee52bff77b07b5d46d4800f109f5f /sal
parent6276e7c28ed53670fb911ec2bd97a6696583d36b (diff)
update loplugin:stringview* for o3tl::iterateCodePoints
And change o3tl::iterateCodePoints to use sal_Int32 for its second param, to integrate better with places where the parameter comes from an UNO API, which cannot use std::size_t Change-Id: I7b9dd2c9bc7f48e6c4a912f039f1b5dae7beae69 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151421 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sal')
-rw-r--r--sal/rtl/ustring.cxx5
1 files changed, 1 insertions, 4 deletions
diff --git a/sal/rtl/ustring.cxx b/sal/rtl/ustring.cxx
index c863be00512b..2a730f8cb5fa 100644
--- a/sal/rtl/ustring.cxx
+++ b/sal/rtl/ustring.cxx
@@ -778,11 +778,8 @@ sal_uInt32 SAL_CALL rtl_uString_iterateCodePoints(
&& o3tl::cmp_less_equal(*indexUtf16, std::numeric_limits<std::size_t>::max()));
// using o3tl::cmp_less_equal nicely avoids potential
// -Wtautological-constant-out-of-range-compare
- std::size_t i = *indexUtf16;
auto const cp = o3tl::iterateCodePoints(
- std::u16string_view(string->buffer, string->length), &i, incrementCodePoints);
- assert(i <= o3tl::make_unsigned(std::numeric_limits<sal_Int32>::max()));
- *indexUtf16 = i;
+ std::u16string_view(string->buffer, string->length), indexUtf16, incrementCodePoints);
return cp;
}