From f02ebc89ec89e78a348f9b67d613a2024feabc18 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 3 Apr 2019 15:23:06 -0700 Subject: [PATCH] [array] Add compy assignment operator since copy constructor is explicit --- src/hb-array.hh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hb-array.hh b/src/hb-array.hh index 8853a87..2bfbdd4 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -46,9 +46,15 @@ struct hb_array_t : hb_iter_with_fallback_t, Type&> hb_array_t (const hb_array_t &o) : arrayZ (o.arrayZ), length (o.length) {} template hb_array_t (const hb_array_t &o) : arrayZ (o.arrayZ), length (o.length) {} + hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {} template hb_array_t (Type (&array_)[length_]) : arrayZ (array_), length (length_) {} + template + hb_array_t& operator = (const hb_array_t &o) + { arrayZ = o.arrayZ; length = o.length; return *this; } + hb_array_t& operator = (const hb_array_t &o) + { arrayZ = o.arrayZ; length = o.length; return *this; } /* * Iterator implementation. */ -- 2.7.4