summaryrefslogtreecommitdiff
path: root/thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc')
-rw-r--r--thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc16
1 files changed, 7 insertions, 9 deletions
diff --git a/thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc b/thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc
index 48a3c74463..6eb400ab16 100644
--- a/thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc
+++ b/thirdparty/harfbuzz/src/hb-ot-shaper-indic.cc
@@ -92,24 +92,22 @@ struct hb_indic_would_substitute_feature_t
void init (const hb_ot_map_t *map, hb_tag_t feature_tag, bool zero_context_)
{
zero_context = zero_context_;
- map->get_stage_lookups (0/*GSUB*/,
- map->get_feature_stage (0/*GSUB*/, feature_tag),
- &lookups, &count);
+ lookups = map->get_stage_lookups (0/*GSUB*/,
+ map->get_feature_stage (0/*GSUB*/, feature_tag));
}
bool would_substitute (const hb_codepoint_t *glyphs,
unsigned int glyphs_count,
hb_face_t *face) const
{
- for (unsigned int i = 0; i < count; i++)
- if (hb_ot_layout_lookup_would_substitute (face, lookups[i].index, glyphs, glyphs_count, zero_context))
+ for (const auto &lookup : lookups)
+ if (hb_ot_layout_lookup_would_substitute (face, lookup.index, glyphs, glyphs_count, zero_context))
return true;
return false;
}
private:
- const hb_ot_map_t::lookup_map_t *lookups;
- unsigned int count;
+ hb_array_t<const hb_ot_map_t::lookup_map_t> lookups;
bool zero_context;
};
@@ -1528,12 +1526,12 @@ const hb_ot_shaper_t _hb_ot_shaper_indic =
data_destroy_indic,
preprocess_text_indic,
nullptr, /* postprocess_glyphs */
- HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
decompose_indic,
compose_indic,
setup_masks_indic,
- HB_TAG_NONE, /* gpos_tag */
nullptr, /* reorder_marks */
+ HB_TAG_NONE, /* gpos_tag */
+ HB_OT_SHAPE_NORMALIZATION_MODE_COMPOSED_DIACRITICS_NO_SHORT_CIRCUIT,
HB_OT_SHAPE_ZERO_WIDTH_MARKS_NONE,
false, /* fallback_position */
};