[subset-cff] Micro-optimize copy_str

This commit is contained in:
Behdad Esfahbod 2022-11-25 14:38:30 -07:00
parent e333223f26
commit d2f3cde7ef
1 changed files with 2 additions and 2 deletions

View File

@ -119,9 +119,9 @@ struct str_encoder_t
return;
/* Faster than hb_memcpy for small strings. */
auto &arr = buff.arrayZ;
auto arr = buff.arrayZ + offset;
for (unsigned i = 0; i < length; i++)
arr[i + offset] = str[i];
arr[i] = str[i];
//hb_memcpy (buff.arrayZ + offset, str, length);
}