void reset ()
{
+ if (unlikely (hb_object_is_immutable (this)))
+ return;
+ successful = true;
clear ();
}
void clear ()
{
+ if (unlikely (hb_object_is_immutable (this)))
+ return;
if (items)
+ hb_iter (items, mask + 1)
| hb_apply ([] (item_t &_) { _.clear (); }) /* TODO make pointer-to-methods invokable. */
return *this;
}
- hb_bytes_t as_bytes () const { return hb_bytes_t ((const char *) arrayZ_,
- length * item_size); }
+ hb_bytes_t as_bytes () const
+ { return hb_bytes_t ((const char *) arrayZ(), length * item_size); }
- bool operator == (const hb_vector_t &o) const { return as_bytes () == o.as_bytes (); }
- uint32_t hash () const { return as_bytes ().hash (); }
+ bool operator == (const hb_vector_t &o) const { return as_array () == o.as_array (); }
+ uint32_t hash () const { return as_array ().hash (); }
const Type * arrayZ () const { return arrayZ_; }
Type * arrayZ () { return arrayZ_; }