提交 d6005b49 编写于 作者: B Behdad Esfahbod

[serialize] Start implementing linking

上级 313b3057
......@@ -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 <typename Type>
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册