commit | 18a078f968072990cc50f96d4b6e47b32a6001c5 | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <behdad@behdad.org> | Mon Nov 01 20:06:58 2021 -0600 |
committer | Behdad Esfahbod <behdad@behdad.org> | Mon Nov 01 20:06:58 2021 -0600 |
tree | 43837cd40cc8fdd10459465a0d8ddda8aeef4ae5 | |
parent | eeda2c549ddd103ebf8f9d1e20ae30137f5ed532 [diff] |
[vector] Implement move assignment using swap
diff --git a/src/hb-vector.hh b/src/hb-vector.hh index d3a5dff..af07c28 100644 --- a/src/hb-vector.hh +++ b/src/hb-vector.hh
@@ -110,11 +110,7 @@ } hb_vector_t& operator = (hb_vector_t &&o) { - fini (); - allocated = o.allocated; - length = o.length; - arrayZ = o.arrayZ; - o.init (); + hb_swap (*this, o); return *this; }