From a7dd90f519fb7ab046e92ea3b7101c21d5040bbc Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 1 Jun 2018 16:07:55 -0700 Subject: [PATCH] Revert "Remove HB_DISALLOW_COPY_AND_ASSIGN" This reverts commit ff92de766bf775bfdd3a01bda94de699180ff86a. Revert that and remove ASSERT_POD. Let's see which bots are unhappy with this configuration... --- src/hb-map-private.hh | 3 +-- src/hb-ot-shape-private.hh | 2 +- src/hb-private.hh | 6 +++++- src/hb-set-private.hh | 3 +-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hb-map-private.hh b/src/hb-map-private.hh index 46634465d..cad6f0e2d 100644 --- a/src/hb-map-private.hh +++ b/src/hb-map-private.hh @@ -98,7 +98,6 @@ struct hb_map_t }; hb_object_header_t header; - ASSERT_POD (); bool successful; /* Allocations successful */ unsigned int population; /* Not including tombstones. */ unsigned int occupancy; /* Including tombstones. */ @@ -252,7 +251,7 @@ struct hb_map_t } private: - HB_DISALLOW_ASSIGN (hb_map_t); + HB_DISALLOW_COPY_AND_ASSIGN (hb_map_t); }; diff --git a/src/hb-ot-shape-private.hh b/src/hb-ot-shape-private.hh index a540e6afa..c217af0c0 100644 --- a/src/hb-ot-shape-private.hh +++ b/src/hb-ot-shape-private.hh @@ -99,7 +99,7 @@ struct hb_ot_shape_planner_t } private: - HB_DISALLOW_ASSIGN (hb_ot_shape_planner_t); + HB_DISALLOW_COPY_AND_ASSIGN (hb_ot_shape_planner_t); }; diff --git a/src/hb-private.hh b/src/hb-private.hh index 53dfd8086..05f0adbe5 100644 --- a/src/hb-private.hh +++ b/src/hb-private.hh @@ -537,7 +537,11 @@ _hb_ceil_to_4 (unsigned int v) */ #define HB_DISALLOW_ASSIGN(TypeName) \ - void operator=(const TypeName&) + void operator=(const TypeName&) = delete + +#define HB_DISALLOW_COPY_AND_ASSIGN(TypeName) \ + TypeName(const TypeName&) = delete; \ + void operator=(const TypeName&) = delete /* * Static pools diff --git a/src/hb-set-private.hh b/src/hb-set-private.hh index 0129af87e..323c6f4ba 100644 --- a/src/hb-set-private.hh +++ b/src/hb-set-private.hh @@ -180,7 +180,6 @@ struct hb_set_t static_assert (page_t::PAGE_BITS == sizeof (page_t) * 8, ""); hb_object_header_t header; - ASSERT_POD (); bool successful; /* Allocations successful */ mutable unsigned int population; hb_vector_t page_map; @@ -679,7 +678,7 @@ struct hb_set_t inline hb_codepoint_t major_start (unsigned int major) const { return major * page_t::PAGE_BITS; } private: - HB_DISALLOW_ASSIGN (hb_set_t); + HB_DISALLOW_COPY_AND_ASSIGN (hb_set_t); };