mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-30 18:13:53 +01:00
[subset/cff] Minor optimization
This commit is contained in:
1 parent
570fb4df58
commit
c2bab07391
1 file changed
+3
-1
@@ -364,6 +364,7 @@ struct FDArray : CFFIndex<COUNT>
|
||||
sizes.alloc (hb_len (it));
|
||||
|
||||
c->push ();
|
||||
char *data_base = c->head;
|
||||
+ it
|
||||
| hb_map ([&] (const hb_pair_t<const DICTVAL&, const INFO&> &_)
|
||||
{
|
||||
@@ -373,13 +374,14 @@ struct FDArray : CFFIndex<COUNT>
|
||||
})
|
||||
| hb_sink (sizes)
|
||||
;
|
||||
unsigned data_size = c->head - data_base;
|
||||
c->pop_pack (false);
|
||||
|
||||
/* It just happens that the above is packed right after the header below.
|
||||
* Such a hack. */
|
||||
|
||||
/* serialize INDEX header */
|
||||
return_trace (CFFIndex<COUNT>::serialize_header (c, hb_iter (sizes)));
|
||||
return_trace (CFFIndex<COUNT>::serialize_header (c, hb_iter (sizes), data_size));
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user