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

[serialize] Only pack main object if there are other objects

Avoids a memmove for tables that don't use the object packing mechanism.
上级 946d446f
......@@ -122,8 +122,11 @@ struct hb_serialize_context_t
/* TODO Propagate errors. */
assert (current.length == 1);
/* TODO Enable when callers are updated. */
//pop_pack ();
/* Only "pack" if there exist other objects... Otherwise, don't bother.
* Saves a copy. */
if (packed.length > 1)
pop_pack ();
}
template <typename Type>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册