From 325c571c22231978e5409902b514d2584186e0a0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 5 May 2023 12:07:00 +0200 Subject: 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 --- o3tl/qa/test-string_view.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'o3tl') diff --git a/o3tl/qa/test-string_view.cxx b/o3tl/qa/test-string_view.cxx index c658da16b5dc..bbe5cbf0eddc 100644 --- a/o3tl/qa/test-string_view.cxx +++ b/o3tl/qa/test-string_view.cxx @@ -736,15 +736,15 @@ private: void testIterateCodePoints() { { - std::size_t i = 1; + sal_Int32 i = 1; auto const c = o3tl::iterateCodePoints(u"\U00010000", &i, 1); - CPPUNIT_ASSERT_EQUAL(std::size_t(2), i); + CPPUNIT_ASSERT_EQUAL(sal_Int32(2), i); CPPUNIT_ASSERT_EQUAL(sal_uInt32(0xDC00), c); } { - std::size_t i = 2; + sal_Int32 i = 2; auto const c = o3tl::iterateCodePoints(u"a\U00010000", &i, -1); - CPPUNIT_ASSERT_EQUAL(std::size_t(1), i); + CPPUNIT_ASSERT_EQUAL(sal_Int32(1), i); CPPUNIT_ASSERT_EQUAL(sal_uInt32(0x10000), c); } } -- cgit