[vector] Implement move assignment using swap

This commit is contained in:
Behdad Esfahbod 2021-11-01 20:06:58 -06:00
parent eeda2c549d
commit 18a078f968
1 changed files with 1 additions and 5 deletions

View File

@ -110,11 +110,7 @@ struct hb_vector_t
}
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;
}