Optimize a couple array references

This commit is contained in:
Behdad Esfahbod 2022-11-26 17:10:58 -07:00
parent 04d23b7ca8
commit 42615561b5
2 changed files with 3 additions and 3 deletions

View File

@ -214,7 +214,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
if (feature_infos.length)
{
feature_infos.qsort ();
auto &f = feature_infos.arrayZ;
auto *f = feature_infos.arrayZ;
unsigned int j = 0;
unsigned count = feature_infos.length;
for (unsigned int i = 1; i < count; i++)

View File

@ -119,7 +119,7 @@ struct str_encoder_t
return;
/* Faster than hb_memcpy for small strings. */
auto arr = buff.arrayZ + offset;
auto *arr = buff.arrayZ + offset;
/* Length is at least one; and mostly just one. */
arr[0] = str[0];
for (unsigned i = 1; i < length; i++)
@ -1008,7 +1008,7 @@ struct subr_subsetter_t
if (str.prefix_op () != OpCode_Invalid)
encoder.encode_op (str.prefix_op ());
}
auto &arr = str.values.arrayZ;
auto *arr = str.values.arrayZ;
for (unsigned int i = 0; i < count; i++)
{
const parsed_cs_op_t &opstr = arr[i];