[arrays] Add copy-constructor to hb_array_t and hb_sorted_array_t

This commit is contained in:
Behdad Esfahbod 2018-11-24 01:47:49 -05:00
parent 61de55bf49
commit ad5c871d80

View File

@ -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<T> hb_array (T *array, unsigned int len)
template <typename Type>
struct hb_sorted_array_t : hb_array_t<Type>
{
inline hb_sorted_array_t (const hb_array_t<Type> &o) : hb_array_t<Type> (o) {}
inline hb_sorted_array_t (Type *array_, unsigned int len_) : hb_array_t<Type> (array_, len_) {}
template <typename T>