[vector] Add swap() friend to hb_sorted_vector_t

This commit is contained in:
Behdad Esfahbod 2021-11-01 21:43:44 -06:00
parent e97e79967e
commit a28b5d03b5
1 changed files with 2 additions and 0 deletions

View File

@ -316,6 +316,8 @@ struct hb_sorted_vector_t : hb_vector_t<Type>
hb_sorted_vector_t () : hb_vector_t<Type> () {}
hb_sorted_vector_t (std::initializer_list<Type> lst) : hb_vector_t<Type> (lst) {}
hb_sorted_vector_t (hb_sorted_vector_t& o) : hb_vector_t<Type> (o) {}
friend void swap (hb_sorted_vector_t& a, hb_sorted_vector_t& b)
{ hb_swap ((hb_vector_t<Type>&) (a), (hb_vector_t<Type>&) (b)); }
hb_sorted_array_t< Type> as_array () { return hb_sorted_array (this->arrayZ, this->length); }
hb_sorted_array_t<const Type> as_array () const { return hb_sorted_array (this->arrayZ, this->length); }