[ot-map] Minor refactor features[i] access

This commit is contained in:
Behdad Esfahbod 2022-11-21 11:05:47 -07:00
parent 5ee6d5d77e
commit 0387182c2a
1 changed files with 10 additions and 7 deletions

View File

@ -330,15 +330,18 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m,
global_bit_mask); global_bit_mask);
for (unsigned i = 0; i < m.features.length; i++) for (unsigned i = 0; i < m.features.length; i++)
if (m.features[i].stage[table_index] == stage) {
auto &feature = m.features[i];
if (feature.stage[table_index] == stage)
add_lookups (m, table_index, add_lookups (m, table_index,
m.features[i].index[table_index], feature.index[table_index],
key.variations_index[table_index], key.variations_index[table_index],
m.features[i].mask, feature.mask,
m.features[i].auto_zwnj, feature.auto_zwnj,
m.features[i].auto_zwj, feature.auto_zwj,
m.features[i].random, feature.random,
m.features[i].per_syllable); feature.per_syllable);
}
/* Sort lookups and merge duplicates */ /* Sort lookups and merge duplicates */
if (last_num_lookups < m.lookups[table_index].length) if (last_num_lookups < m.lookups[table_index].length)