From d6005b49b32410543a8dfa93ce2a213223cf8f01 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 30 Mar 2019 19:49:56 -0700 Subject: [PATCH] [serialize] Start implementing linking --- src/hb-serialize.hh | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/hb-serialize.hh b/src/hb-serialize.hh index 4de87d823..ab07080b8 100644 --- a/src/hb-serialize.hh +++ b/src/hb-serialize.hh @@ -143,9 +143,13 @@ struct hb_serialize_context_t assert (current.length == 1); /* Only "pack" if there exist other objects... Otherwise, don't bother. - * Saves a copy. */ - if (packed.length > 1) - pop_pack (); + * Saves a move. */ + if (packed.length == 1) + return; + + pop_pack (); + + link (); } template @@ -214,6 +218,11 @@ struct hb_serialize_context_t assert (packed.tail ().head == tail); } + void link () + { + // XXX + } + unsigned int length () const { return this->head - current.tail ().head; } void align (unsigned int alignment)