[serialize] Movce empty-object handling earlier
This commit is contained in:
parent
7f73c9744e
commit
e04518bafc
|
@ -172,6 +172,9 @@ struct hb_serialize_context_t
|
|||
obj.tail = head;
|
||||
unsigned len = obj.tail - obj.head;
|
||||
|
||||
if (!len)
|
||||
return 0;
|
||||
|
||||
objidx_t objidx = packed_map.get (&obj);
|
||||
if (objidx)
|
||||
{
|
||||
|
@ -183,9 +186,6 @@ struct hb_serialize_context_t
|
|||
memmove (tail, obj.head, len);
|
||||
head = obj.head;
|
||||
|
||||
if (!len)
|
||||
return 0;
|
||||
|
||||
obj.head = tail;
|
||||
obj.tail = tail + len;
|
||||
|
||||
|
|
Loading…
Reference in New Issue