mirror of
https://github.com/harfbuzz/harfbuzz.git
synced 2025-04-14 17:13:40 +00:00
[subset/cff] Micro-optimize CFFIndex for empty strings
This commit is contained in:
parent
acae5ed25c
commit
35e152b9f4
1 changed files with 4 additions and 1 deletions
|
@ -73,8 +73,11 @@ struct CFFIndex
|
|||
for (const auto &_ : +it)
|
||||
{
|
||||
auto it = hb_iter (_);
|
||||
if (hb_len (it) == 1)
|
||||
unsigned len = hb_len (it);
|
||||
if (len <= 1)
|
||||
{
|
||||
if (!len)
|
||||
continue;
|
||||
unsigned char *ret = c->allocate_size<unsigned char> (1, false);
|
||||
if (unlikely (!ret)) return_trace (false);
|
||||
*ret = *it.arrayZ;
|
||||
|
|
Loading…
Add table
Reference in a new issue