diff --git a/src/hb-array.hh b/src/hb-array.hh index 61037e2a6..1c5dc01e9 100644 --- a/src/hb-array.hh +++ b/src/hb-array.hh @@ -57,6 +57,15 @@ struct hb_array_t Type * operator & (void) const { return arrayZ; } + hb_array_t & operator += (unsigned int count) + { + if (unlikely (count > len)) + count = len; + len -= count; + arrayZ += count; + return *this; + } + unsigned int get_size (void) const { return len * item_size; } hb_array_t sub_array (unsigned int start_offset = 0, unsigned int *seg_count = nullptr /* IN/OUT */) const @@ -241,15 +250,6 @@ struct Supplier : hb_array_t this->len = v.len; } - Supplier & operator += (unsigned int count) - { - if (unlikely (count > this->len)) - count = this->len; - this->len -= count; - this->arrayZ += count; - return *this; - } - private: Supplier (const Supplier &); /* Disallow copy */ Supplier& operator= (const Supplier &); /* Disallow copy */