From a28b5d03b5c86d2ffc352ef35463718aa4a00a9f Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 1 Nov 2021 21:43:44 -0600 Subject: [PATCH] [vector] Add swap() friend to hb_sorted_vector_t --- src/hb-vector.hh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/hb-vector.hh b/src/hb-vector.hh index 286b79f73..43e21d498 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh @@ -316,6 +316,8 @@ struct hb_sorted_vector_t : hb_vector_t hb_sorted_vector_t () : hb_vector_t () {} hb_sorted_vector_t (std::initializer_list lst) : hb_vector_t (lst) {} hb_sorted_vector_t (hb_sorted_vector_t& o) : hb_vector_t (o) {} + friend void swap (hb_sorted_vector_t& a, hb_sorted_vector_t& b) + { hb_swap ((hb_vector_t&) (a), (hb_vector_t&) (b)); } hb_sorted_array_t< Type> as_array () { return hb_sorted_array (this->arrayZ, this->length); } hb_sorted_array_t as_array () const { return hb_sorted_array (this->arrayZ, this->length); }