From ad5c871d801b481f95dd32c8b65ecc70def597be Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 24 Nov 2018 01:47:49 -0500 Subject: [PATCH] [arrays] Add copy-constructor to hb_array_t and hb_sorted_array_t --- src/hb-dsalgs.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-dsalgs.hh b/src/hb-dsalgs.hh index ef030732a..876060721 100644 --- a/src/hb-dsalgs.hh +++ b/src/hb-dsalgs.hh @@ -564,6 +564,7 @@ struct hb_array_t { static_assert ((bool) (unsigned) hb_static_size (Type), ""); + inline hb_array_t (const hb_array_t &o) : arrayZ (o.arrayZ), len (o.len) {} inline hb_array_t (Type *array_, unsigned int len_) : arrayZ (array_), len (len_) {} inline Type& operator [] (unsigned int i) const @@ -642,6 +643,7 @@ inline hb_array_t hb_array (T *array, unsigned int len) template struct hb_sorted_array_t : hb_array_t { + inline hb_sorted_array_t (const hb_array_t &o) : hb_array_t (o) {} inline hb_sorted_array_t (Type *array_, unsigned int len_) : hb_array_t (array_, len_) {} template