diff --git a/src/hb-array.hh b/src/hb-array.hh index 2e7a4fa21..96d2e0a97 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -50,7 +50,7 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> template hb_array_t (const hb_array_t &o) : - hb_iter_with_fallback_t, Type&> (), + hb_iter_with_fallback_t (), arrayZ (o.arrayZ), length (o.length), backwards_length (o.backwards_length) {} template @@ -106,7 +106,7 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> */ /* Note: our compare is NOT lexicographic; it also does NOT call Type::cmp. */ - int cmp (const hb_array_t &a) const + int cmp (const hb_array_t &a) const { if (length != a.length) return (int) a.length - (int) length; @@ -114,8 +114,8 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> } HB_INTERNAL static int cmp (const void *pa, const void *pb) { - hb_array_t *a = (hb_array_t *) pa; - hb_array_t *b = (hb_array_t *) pb; + hb_array_t *a = (hb_array_t *) pa; + hb_array_t *b = (hb_array_t *) pb; return b->cmp (*a); } @@ -164,7 +164,7 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> unsigned int get_size () const { return length * this->item_size; } - hb_array_t sub_array (unsigned int start_offset = 0, unsigned int *seg_count = nullptr /* IN/OUT */) const + hb_array_t sub_array (unsigned int start_offset = 0, unsigned int *seg_count = nullptr /* IN/OUT */) const { if (!start_offset && !seg_count) return *this; @@ -176,9 +176,9 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> count -= start_offset; if (seg_count) count = *seg_count = hb_min (count, *seg_count); - return hb_array_t (arrayZ + start_offset, count); + return hb_array_t (arrayZ + start_offset, count); } - hb_array_t sub_array (unsigned int start_offset, unsigned int seg_count) const + hb_array_t sub_array (unsigned int start_offset, unsigned int seg_count) const { return sub_array (start_offset, &seg_count); } template , Type&>, hb_array_t { - typedef hb_iter_t, Type&> iter_base_t; + typedef hb_iter_t iter_base_t; HB_ITER_USING (iter_base_t); static constexpr bool is_random_access_iterator = true; static constexpr bool is_sorted_iterator = true; @@ -247,7 +247,7 @@ struct hb_sorted_array_t : template hb_sorted_array_t (const hb_array_t &o) : - hb_iter_t, Type&> (), + hb_iter_t (), hb_array_t (o) {} template @@ -258,9 +258,9 @@ struct hb_sorted_array_t : bool operator != (const hb_sorted_array_t& o) const { return this->arrayZ != o.arrayZ || this->length != o.length; } - hb_sorted_array_t sub_array (unsigned int start_offset, unsigned int *seg_count /* IN/OUT */) const - { return hb_sorted_array_t (((const hb_array_t *) (this))->sub_array (start_offset, seg_count)); } - hb_sorted_array_t sub_array (unsigned int start_offset, unsigned int seg_count) const + hb_sorted_array_t sub_array (unsigned int start_offset, unsigned int *seg_count /* IN/OUT */) const + { return hb_sorted_array_t (((const hb_array_t *) (this))->sub_array (start_offset, seg_count)); } + hb_sorted_array_t sub_array (unsigned int start_offset, unsigned int seg_count) const { return sub_array (start_offset, &seg_count); } template