From c51f15ddfcae8578483693b761b81ceaebf05f2a Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 26 Apr 2019 13:03:41 -0700 Subject: [PATCH] [array] Adjust hb_sorted_array_t copy constructor/assignment to match hb_array_t --- src/hb-array.hh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/hb-array.hh b/src/hb-array.hh index 7a781bea3..b4619ee9a 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -211,12 +211,19 @@ struct hb_sorted_array_t : static constexpr bool is_sorted_iterator = true; hb_sorted_array_t () : hb_array_t () {} - hb_sorted_array_t (const hb_array_t &o) : hb_array_t (o) {} - template - hb_sorted_array_t (const hb_sorted_array_t > &o) : hb_array_t (o) {} hb_sorted_array_t (Type *array_, unsigned int length_) : hb_array_t (array_, length_) {} template hb_sorted_array_t (Type (&array_)[length_]) : hb_array_t (array_) {} + template + hb_sorted_array_t (const hb_array_t &o) : + hb_iter_t, Type&> (), + hb_array_t (o) {} + template + hb_sorted_array_t& operator = (const hb_array_t &o) + { hb_array_t (*this) = o; return *this; } + 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