i18npool/source/nativenumber/nativenumbersupplier.cxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit 6400c23d6a37617f92dbe4f514c0691e4e50fa05 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Apr 12 10:23:10 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue Apr 12 11:50:35 2022 +0200 Pick better type for a variable Change-Id: I30916b188c7f8de06aec0719e79aa134a3250aef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132890 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sberg...@redhat.com> diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx index 0f5c74f8bd56..01f2382713db 100644 --- a/i18npool/source/nativenumber/nativenumbersupplier.cxx +++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx @@ -27,6 +27,7 @@ #include <comphelper/processfactory.hxx> #include <cppuhelper/supportsservice.hxx> #include <o3tl/string_view.hxx> +#include <cstddef> #include <map> #include <mutex> #include <memory> @@ -669,7 +670,7 @@ OUString NativeNumberSupplierService::getNativeNumberString(const OUString& aNum { std::u16string_view(u"title"), TITLE } }; - sal_Int32 nStripCase = 0; + std::size_t nStripCase = 0; size_t nCasing; for (nCasing = 0; nCasing < SAL_N_ELEMENTS(Casings); ++nCasing) { @@ -680,7 +681,7 @@ OUString NativeNumberSupplierService::getNativeNumberString(const OUString& aNum } } - if (nStripCase > 0 && (static_cast<sal_Int32>(rNativeNumberParams.size()) == nStripCase || + if (nStripCase > 0 && (rNativeNumberParams.size() == nStripCase || rNativeNumberParams[nStripCase++] == ' ')) { OUString aStr = getNumberText(rLocale, aNumberString, rNativeNumberParams.substr(nStripCase));