This commit is contained in:
Behdad Esfahbod 2012-09-03 20:58:03 -04:00
parent f8fa2b5cf6
commit 4912030dfb
2 changed files with 4 additions and 4 deletions

View File

@ -601,7 +601,7 @@ struct GenericOffsetTo : OffsetType
inline Type& serialize (hb_serialize_context_t *c, void *base)
{
Type *t = (Type *) c->head;
this->set ((char *) t - (char *) base);
this->set ((char *) t - (char *) base); /* TODO(serialize) Overflow? */
return *t;
}
@ -682,7 +682,7 @@ struct GenericArrayOf
{
TRACE_SERIALIZE ();
if (unlikely (!c->extend_min (*this))) return TRACE_RETURN (false);
len.set (items_len); /* TODO may overflow */
len.set (items_len); /* TODO(serialize) Overflow? */
if (unlikely (!c->extend (*this))) return TRACE_RETURN (false);
unsigned int count = items_len;
for (unsigned int i = 0; i < count; i++)

View File

@ -80,7 +80,7 @@ struct SingleSubstFormat1
TRACE_SERIALIZE ();
if (unlikely (!c->extend_min (*this))) return TRACE_RETURN (false);
if (unlikely (!coverage.serialize (c, this).serialize (c, glyphs, num_glyphs))) return TRACE_RETURN (false);
deltaGlyphID.set (delta); /* TODO overflow? */
deltaGlyphID.set (delta); /* TODO(serilaize) overflow? */
return TRACE_RETURN (true);
}
@ -211,7 +211,7 @@ struct SingleSubst
unsigned int delta;
if (num_glyphs) {
format = 1;
/* TODO check for wrap-around */
/* TODO(serialize) check for wrap-around */
delta = substitutes[0] - glyphs[0];
for (unsigned int i = 1; i < num_glyphs; i++)
if (delta != substitutes[i] - glyphs[i]) {