[set] Add copy constructor/assignment

This commit is contained in:
Behdad Esfahbod 2021-06-09 11:41:59 -06:00
parent a83b9b0fec
commit 9cfac093aa
1 changed files with 4 additions and 1 deletions

View File

@ -40,10 +40,13 @@
struct hb_set_t struct hb_set_t
{ {
HB_DELETE_COPY_ASSIGN (hb_set_t);
hb_set_t () { init (); } hb_set_t () { init (); }
~hb_set_t () { fini (); } ~hb_set_t () { fini (); }
hb_set_t (const hb_set_t& other) : hb_set_t () { set (&other); }
void operator= (const hb_set_t& other) { set (&other); }
// TODO Add move construtor/assign
struct page_map_t struct page_map_t
{ {
int cmp (const page_map_t &o) const { return (int) o.major - (int) major; } int cmp (const page_map_t &o) const { return (int) o.major - (int) major; }