[subset-cff] Micro-optimize copy_str
This commit is contained in:
parent
e333223f26
commit
d2f3cde7ef
|
@ -119,9 +119,9 @@ struct str_encoder_t
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Faster than hb_memcpy for small strings. */
|
/* Faster than hb_memcpy for small strings. */
|
||||||
auto &arr = buff.arrayZ;
|
auto arr = buff.arrayZ + offset;
|
||||||
for (unsigned i = 0; i < length; i++)
|
for (unsigned i = 0; i < length; i++)
|
||||||
arr[i + offset] = str[i];
|
arr[i] = str[i];
|
||||||
//hb_memcpy (buff.arrayZ + offset, str, length);
|
//hb_memcpy (buff.arrayZ + offset, str, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue