From d2f3cde7ef20a7e7d58c3301ac32da6d38a65712 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 25 Nov 2022 14:38:30 -0700 Subject: [PATCH] [subset-cff] Micro-optimize copy_str --- src/hb-subset-cff-common.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-subset-cff-common.hh b/src/hb-subset-cff-common.hh index 04b4fe1c9..f1767d743 100644 --- a/src/hb-subset-cff-common.hh +++ b/src/hb-subset-cff-common.hh @@ -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); }