From 93ac700da612b70fec9efb15ed97855dc15f4582 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 29 Aug 2021 10:32:40 -0600 Subject: [PATCH] [set] Add copy-constructor/assignment again --- src/hb-bit-set.hh | 10 +++++----- src/hb-set.hh | 5 +++++ 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/hb-bit-set.hh b/src/hb-bit-set.hh index e3cc89270..84ad67eb7 100644 --- a/src/hb-bit-set.hh +++ b/src/hb-bit-set.hh @@ -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 { diff --git a/src/hb-set.hh b/src/hb-set.hh index 95132200a..437e23436 100644 --- a/src/hb-set.hh +++ b/src/hb-set.hh @@ -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 () {