Optimize a couple array references
This commit is contained in:
parent
04d23b7ca8
commit
42615561b5
|
@ -214,7 +214,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
|
||||||
if (feature_infos.length)
|
if (feature_infos.length)
|
||||||
{
|
{
|
||||||
feature_infos.qsort ();
|
feature_infos.qsort ();
|
||||||
auto &f = feature_infos.arrayZ;
|
auto *f = feature_infos.arrayZ;
|
||||||
unsigned int j = 0;
|
unsigned int j = 0;
|
||||||
unsigned count = feature_infos.length;
|
unsigned count = feature_infos.length;
|
||||||
for (unsigned int i = 1; i < count; i++)
|
for (unsigned int i = 1; i < count; i++)
|
||||||
|
|
|
@ -119,7 +119,7 @@ struct str_encoder_t
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Faster than hb_memcpy for small strings. */
|
/* 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. */
|
/* Length is at least one; and mostly just one. */
|
||||||
arr[0] = str[0];
|
arr[0] = str[0];
|
||||||
for (unsigned i = 1; i < length; i++)
|
for (unsigned i = 1; i < length; i++)
|
||||||
|
@ -1008,7 +1008,7 @@ struct subr_subsetter_t
|
||||||
if (str.prefix_op () != OpCode_Invalid)
|
if (str.prefix_op () != OpCode_Invalid)
|
||||||
encoder.encode_op (str.prefix_op ());
|
encoder.encode_op (str.prefix_op ());
|
||||||
}
|
}
|
||||||
auto &arr = str.values.arrayZ;
|
auto *arr = str.values.arrayZ;
|
||||||
for (unsigned int i = 0; i < count; i++)
|
for (unsigned int i = 0; i < count; i++)
|
||||||
{
|
{
|
||||||
const parsed_cs_op_t &opstr = arr[i];
|
const parsed_cs_op_t &opstr = arr[i];
|
||||||
|
|
Loading…
Reference in New Issue