From 062cad5e28574f9f004f917afa7d010fa68fdad0 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 28 Aug 2019 13:33:08 -0700 Subject: [PATCH] Add ArrayOf::serialize_append --- src/hb-open-type.hh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/hb-open-type.hh b/src/hb-open-type.hh index d8754466f..74f4ec092 100644 --- a/src/hb-open-type.hh +++ b/src/hb-open-type.hh @@ -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);