mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[subset/cff] Minor optimization
This commit is contained in:
parent
570fb4df58
commit
c2bab07391
1 changed files with 3 additions and 1 deletions
|
@ -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));
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue