diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index f8366ce3a..abd1f82cc 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -228,7 +228,7 @@ struct Glyph /* Init phantom points */ if (unlikely (!points.resize (points.length + PHANTOM_COUNT))) return false; - hb_array_t phantoms = points.sub_array (points.length - PHANTOM_COUNT, PHANTOM_COUNT); + hb_array_t phantoms = points.as_array ().sub_array (points.length - PHANTOM_COUNT, PHANTOM_COUNT); { int lsb = 0; int h_delta = glyf_accelerator.hmtx->get_leading_bearing_without_var_unscaled (gid, &lsb) ? @@ -321,7 +321,7 @@ struct Glyph if (all_points.length > HB_GLYF_MAX_POINTS) return false; - all_points.extend (comp_points.sub_array (0, comp_points.length - PHANTOM_COUNT)); + all_points.extend (comp_points.as_array ().sub_array (0, comp_points.length - PHANTOM_COUNT)); comp_index++; } diff --git a/src/hb-ot-map.cc b/src/hb-ot-map.cc index 39cc9fed2..2139fd893 100644 --- a/src/hb-ot-map.cc +++ b/src/hb-ot-map.cc @@ -343,7 +343,7 @@ hb_ot_map_builder_t::compile (hb_ot_map_t &m, /* Sort lookups and merge duplicates */ if (last_num_lookups < m.lookups[table_index].length) { - m.lookups[table_index].sub_array (last_num_lookups, m.lookups[table_index].length - last_num_lookups).qsort (); + m.lookups[table_index].as_array ().sub_array (last_num_lookups, m.lookups[table_index].length - last_num_lookups).qsort (); unsigned int j = last_num_lookups; for (unsigned int i = j + 1; i < m.lookups[table_index].length; i++) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index b636e1d22..32adbf5cc 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -164,15 +164,6 @@ struct hb_vector_t operator iter_t () const { return iter (); } operator writer_t () { return writer (); } - c_array_t sub_array (unsigned int start_offset, unsigned int count) const - { return as_array ().sub_array (start_offset, count); } - c_array_t sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) const - { return as_array ().sub_array (start_offset, count); } - array_t sub_array (unsigned int start_offset, unsigned int count) - { return as_array ().sub_array (start_offset, count); } - array_t sub_array (unsigned int start_offset, unsigned int *count = nullptr /* IN/OUT */) - { return as_array ().sub_array (start_offset, count); } - hb_sorted_array_t as_sorted_array () { return hb_sorted_array (arrayZ, length); } hb_sorted_array_t as_sorted_array () const