[set] Add copy-constructor/assignment again

This commit is contained in:
Behdad Esfahbod 2021-08-29 10:32:40 -06:00
parent b9a176e268
commit 93ac700da6
2 changed files with 10 additions and 5 deletions

View File

@ -38,6 +38,11 @@ struct hb_bit_set_t
hb_bit_set_t () { init (); }
~hb_bit_set_t () { fini (); }
hb_bit_set_t (const hb_bit_set_t& other) : hb_bit_set_t () { set (other); }
void operator= (const hb_bit_set_t& other) { set (other); }
// TODO Add move construtor/assign
// TODO Add constructor for Iterator; with specialization for (sorted) vector / array?
void init ()
{
successful = true;
@ -52,11 +57,6 @@ struct hb_bit_set_t
pages.fini ();
}
hb_bit_set_t (const hb_bit_set_t& other) : hb_bit_set_t () { set (other); }
void operator= (const hb_bit_set_t& other) { set (other); }
// TODO Add move construtor/assign
// TODO Add constructor for Iterator; with specialization for (sorted) vector / array?
using page_t = hb_bit_page_t;
struct page_map_t
{

View File

@ -41,6 +41,11 @@ struct hb_sparseset_t
hb_sparseset_t () { init (); }
~hb_sparseset_t () { fini (); }
hb_sparseset_t (const hb_sparseset_t& other) : hb_sparseset_t () { set (other); }
void operator= (const hb_sparseset_t& other) { set (other); }
// TODO Add move construtor/assign
// TODO Add constructor for Iterator
void init_shallow () { s.init (); }
void init ()
{