Add ArrayOf::serialize_append

This commit is contained in:
Behdad Esfahbod 2019-08-28 13:33:08 -07:00
parent b66076812d
commit 062cad5e28
1 changed files with 12 additions and 0 deletions

View File

@ -606,6 +606,18 @@ struct ArrayOf
return_trace (true);
}
Type* serialize_append (hb_serialize_context_t *c)
{
TRACE_SERIALIZE (this);
len++;
if (unlikely (!len || !c->extend (*this)))
{
len--;
return_trace (nullptr);
}
return_trace (&arrayZ[len - 1]);
}
ArrayOf* copy (hb_serialize_context_t *c) const
{
TRACE_SERIALIZE (this);