loplugin:loopvartoosmall

> /Users/stephan/lo/core/vcl/quartz/ctfonts.cxx:255:33: error: loop index type 'unsigned int' is narrower than length type 'CFIndex' (aka 'long') [loplugin:loopvartoosmall]
>             for (auto i = 0u; i < nTags; i++)
>                               ~~^~~~~~~

(and whatever the motivation in d7083fe6dd
"tdf#72456: Support font embedding on macOS" to use an unsigned 0u here)

Change-Id: I6a96dd2b2146c27d68a8a53daf3c2fe1f744738d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141201
Reviewed-by: خالد حسني <khaled@aliftype.com>
Tested-by: Jenkins
This commit is contained in:
Stephan Bergmann
2022-10-11 09:12:17 +02:00
parent 71337b4327
commit d0f3e24a7a
+1 -1
View File
@@ -252,7 +252,7 @@ hb_blob_t* CoreTextFontFace::GetHbTable(hb_tag_t nTag) const
return nullptr;
hb_face_t* pHbFace = hb_face_builder_create();
for (auto i = 0u; i < nTags; i++)
for (CFIndex i = 0; i < nTags; i++)
{
auto nTable = reinterpret_cast<intptr_t>(CFArrayGetValueAtIndex(pTags, i));
assert(nTable);