From fa7e4ddb61f79f2c1fd540a1445fd0045175a56d Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 26 Apr 2022 14:44:57 +0200 Subject: Pick better variable types Change-Id: I134a8cddba169fe9bcc04687ad15c2cfeaccfb0f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133440 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- unotools/source/misc/fontcvt.cxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'unotools') diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index 736632f86c75..15ea8f2c1ad0 100644 --- a/unotools/source/misc/fontcvt.cxx +++ b/unotools/source/misc/fontcvt.cxx @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -1355,7 +1356,7 @@ const ConvertChar* ConvertChar::GetRecodeData( std::u16string_view rOrgFontName, if( aMapName == "starsymbol" || aMapName == "opensymbol" ) { - for( int i = 0; i < int(SAL_N_ELEMENTS(aStarSymbolRecodeTable)); ++i) + for( std::size_t i = 0; i < SAL_N_ELEMENTS(aStarSymbolRecodeTable); ++i) { const RecodeTable& r = aStarSymbolRecodeTable[i]; if( aOrgName.equalsAscii( r.pOrgName ) ) @@ -1370,7 +1371,7 @@ const ConvertChar* ConvertChar::GetRecodeData( std::u16string_view rOrgFontName, //adobe-symbol to unicode conversion in rtl instead else if( aMapName == "applesymbol" ) { - for( int i = 0; i < int(SAL_N_ELEMENTS(aAppleSymbolRecodeTable)); ++i) + for( std::size_t i = 0; i < SAL_N_ELEMENTS(aAppleSymbolRecodeTable); ++i) { const RecodeTable& r = aAppleSymbolRecodeTable[i]; if( aOrgName.equalsAscii( r.pOrgName ) ) @@ -1399,8 +1400,8 @@ FontToSubsFontConverter CreateFontToSubsFontConverter( std::u16string_view rOrgN if ( nFlags == FontToSubsFontFlags::IMPORT ) { - const int nEntries = 2; // only StarMath+StarBats - for( int i = 0; i < nEntries; ++i ) + const std::size_t nEntries = 2; // only StarMath+StarBats + for( std::size_t i = 0; i < nEntries; ++i ) { const RecodeTable& r = aStarSymbolRecodeTable[i]; if( aName.equalsAscii( r.pOrgName ) ) -- cgit