mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-29 09:34:05 +01:00
[serialize] Movce empty-object handling earlier
This commit is contained in:
1 parent
7f73c9744e
commit
e04518bafc
1 file changed
+3
-3
+3
-3
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user