some more

This commit is contained in:
Michiharu Ariza 2018-11-30 16:31:01 -08:00
parent 9784cff556
commit b1821b9d09
2 changed files with 4 additions and 4 deletions

View File

@ -120,7 +120,7 @@ struct StrEncoder
set_error ();
return;
}
memcpy (&buff[offset], &str.str[0], str.len);
memcpy (&buff[offset], &str.str[static_cast<unsigned int>(0)], str.len);
}
inline bool is_error (void) const { return error; }
@ -226,7 +226,7 @@ struct CFFFontDict_OpSerializer : OpSerializer
{
HBUINT8 *d = c->allocate_size<HBUINT8> (opstr.str.len);
if (unlikely (d == nullptr)) return_trace (false);
memcpy (d, &opstr.str.str[0], opstr.str.len);
memcpy (d, &opstr.str.str[static_cast<unsigned int>(0)], opstr.str.len);
}
return_trace (true);
}

View File

@ -599,7 +599,7 @@ struct cff_subset_plan {
hb_subset_plan_t *plan)
{
/* make sure notdef is first */
if ((plan->glyphs.len == 0) || (plan->glyphs[0] != 0)) return false;
if ((plan->glyphs.len == 0) || (plan->glyphs[static_cast<unsigned int>(0)] != 0)) return false;
final_size = 0;
num_glyphs = plan->glyphs.len;
@ -813,7 +813,7 @@ struct cff_subset_plan {
}
if (!acc.is_CID ())
offsets.privateDictInfo = fontdicts_mod[0].privateDictInfo;
offsets.privateDictInfo = fontdicts_mod[static_cast<unsigned int>(0)].privateDictInfo;
return ((subset_charstrings.len == plan->glyphs.len)
&& (fontdicts_mod.len == subset_fdcount));