[array] Add default copy constructor
authorBehdad Esfahbod <behdad@behdad.org>
Wed, 3 Apr 2019 21:32:15 +0000 (14:32 -0700)
committerBehdad Esfahbod <behdad@behdad.org>
Wed, 3 Apr 2019 21:32:15 +0000 (14:32 -0700)
MSVC seems to need it.

src/hb-array.hh

index 9382db3..8853a87 100644 (file)
@@ -43,6 +43,7 @@ struct hb_array_t : hb_iter_with_fallback_t<hb_array_t<Type>, Type&>
    * Constructors.
    */
   hb_array_t () : arrayZ (nullptr), length (0) {}
+  hb_array_t (const hb_array_t<Type> &o) : arrayZ (o.arrayZ), length (o.length) {}
   template <typename U = Type, hb_enable_if (hb_is_const (U))>
   hb_array_t (const hb_array_t<hb_remove_const (Type)> &o) : arrayZ (o.arrayZ), length (o.length) {}
   hb_array_t (Type *array_, unsigned int length_) : arrayZ (array_), length (length_) {}