[array] Add cast operator to add const to Type

In lieu of constructor removed in previous commit.
pull/1488/head
Behdad Esfahbod 6 years ago
parent 15acf33c22
commit 381c3548e9
  1. 1
      src/hb-array.hh

@ -61,6 +61,7 @@ struct hb_array_t
explicit_operator bool (void) const { return len; }
Type * operator & (void) const { return arrayZ; }
Type & operator * (void) { return (this->operator [])[0]; }
operator hb_array_t<const Type> (void) { return hb_array_t<const Type> (arrayZ, len); }
template <typename T> operator T * (void) const { return arrayZ; }
hb_array_t<Type> & operator += (unsigned int count)

Loading…
Cancel
Save