tdf#145538: Use range based for loops

Change-Id: I8b41b96775fdd26464122e47ec853b48bdd921d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178150
Reviewed-by: Skyler Grey <skyler.grey@collabora.com>
Tested-by: Jenkins
This commit is contained in:
Manish 2024-12-09 19:27:48 +05:30 committed by Ilmari Lauhakangas
parent 9f5040abbf
commit 8f7294223a

View file

@ -63,9 +63,8 @@ static ImplFontAttrs lcl_IsCJKFont( std::u16string_view rFontName )
{ {
// Test, if Fontname includes CJK characters --> In this case we // Test, if Fontname includes CJK characters --> In this case we
// mention that it is a CJK font // mention that it is a CJK font
for(size_t i = 0; i < rFontName.size(); i++) for (const sal_Unicode& ch : rFontName)
{ {
const sal_Unicode ch = rFontName[i];
// japanese // japanese
if ( ((ch >= 0x3040) && (ch <= 0x30FF)) || if ( ((ch >= 0x3040) && (ch <= 0x30FF)) ||
((ch >= 0x3190) && (ch <= 0x319F)) ) ((ch >= 0x3190) && (ch <= 0x319F)) )