提交 824fd342 编写于 作者: B Behdad Esfahbod

Rename a few macros

上级 edfc6be4
...@@ -41,7 +41,7 @@ template <typename K, typename V, ...@@ -41,7 +41,7 @@ template <typename K, typename V,
V vINVALID = hb_is_pointer (V) ? 0 : (V) -1> V vINVALID = hb_is_pointer (V) ? 0 : (V) -1>
struct hb_hashmap_t struct hb_hashmap_t
{ {
HB_NO_COPY_ASSIGN (hb_hashmap_t); HB_DELETE_COPY_ASSIGN (hb_hashmap_t);
hb_hashmap_t () { init (); } hb_hashmap_t () { init (); }
~hb_hashmap_t () { fini (); } ~hb_hashmap_t () { fini (); }
......
...@@ -378,7 +378,7 @@ struct UnsizedArrayOf ...@@ -378,7 +378,7 @@ struct UnsizedArrayOf
typedef Type item_t; typedef Type item_t;
static constexpr unsigned item_size = hb_static_size (Type); static constexpr unsigned item_size = hb_static_size (Type);
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE (UnsizedArrayOf, Type); HB_DELETE_CREATE_COPY_ASSIGN_TEMPLATE (UnsizedArrayOf, Type);
const Type& operator [] (int i_) const const Type& operator [] (int i_) const
{ {
...@@ -534,7 +534,7 @@ struct ArrayOf ...@@ -534,7 +534,7 @@ struct ArrayOf
typedef Type item_t; typedef Type item_t;
static constexpr unsigned item_size = hb_static_size (Type); static constexpr unsigned item_size = hb_static_size (Type);
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (ArrayOf, Type, LenType); HB_DELETE_CREATE_COPY_ASSIGN_TEMPLATE2 (ArrayOf, Type, LenType);
const Type& operator [] (int i_) const const Type& operator [] (int i_) const
{ {
...@@ -715,7 +715,7 @@ struct HeadlessArrayOf ...@@ -715,7 +715,7 @@ struct HeadlessArrayOf
{ {
static constexpr unsigned item_size = Type::static_size; static constexpr unsigned item_size = Type::static_size;
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (HeadlessArrayOf, Type, LenType); HB_DELETE_CREATE_COPY_ASSIGN_TEMPLATE2 (HeadlessArrayOf, Type, LenType);
const Type& operator [] (int i_) const const Type& operator [] (int i_) const
{ {
...@@ -780,7 +780,7 @@ struct HeadlessArrayOf ...@@ -780,7 +780,7 @@ struct HeadlessArrayOf
template <typename Type, typename LenType=HBUINT16> template <typename Type, typename LenType=HBUINT16>
struct ArrayOfM1 struct ArrayOfM1
{ {
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (ArrayOfM1, Type, LenType); HB_DELETE_CREATE_COPY_ASSIGN_TEMPLATE2 (ArrayOfM1, Type, LenType);
const Type& operator [] (int i_) const const Type& operator [] (int i_) const
{ {
...@@ -945,7 +945,7 @@ struct VarSizedBinSearchArrayOf ...@@ -945,7 +945,7 @@ struct VarSizedBinSearchArrayOf
{ {
static constexpr unsigned item_size = Type::static_size; static constexpr unsigned item_size = Type::static_size;
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE (VarSizedBinSearchArrayOf, Type); HB_DELETE_CREATE_COPY_ASSIGN_TEMPLATE (VarSizedBinSearchArrayOf, Type);
bool last_is_terminator () const bool last_is_terminator () const
{ {
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
struct hb_set_t struct hb_set_t
{ {
HB_NO_COPY_ASSIGN (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 (); }
......
...@@ -408,24 +408,24 @@ static_assert ((sizeof (hb_position_t) == 4), ""); ...@@ -408,24 +408,24 @@ static_assert ((sizeof (hb_position_t) == 4), "");
static_assert ((sizeof (hb_mask_t) == 4), ""); static_assert ((sizeof (hb_mask_t) == 4), "");
static_assert ((sizeof (hb_var_int_t) == 4), ""); static_assert ((sizeof (hb_var_int_t) == 4), "");
#define HB_NO_COPY_ASSIGN(TypeName) \ #define HB_DELETE_COPY_ASSIGN(TypeName) \
TypeName(const TypeName&); \ TypeName(const TypeName&); \
void operator=(const TypeName&) void operator=(const TypeName&)
#define HB_NO_COPY_ASSIGN_TEMPLATE(TypeName, T) \ #define HB_DELETE_COPY_ASSIGN_TEMPLATE(TypeName, T) \
TypeName(const TypeName<T>&); \ TypeName(const TypeName<T>&); \
void operator=(const TypeName<T>&) void operator=(const TypeName<T>&)
#define HB_NO_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2) \ #define HB_DELETE_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2) \
TypeName(const TypeName<T1, T2>&); \ TypeName(const TypeName<T1, T2>&); \
void operator=(const TypeName<T1, T2>&) void operator=(const TypeName<T1, T2>&)
#define HB_NO_CREATE_COPY_ASSIGN(TypeName) \ #define HB_DELETE_CREATE_COPY_ASSIGN(TypeName) \
TypeName(); \ TypeName(); \
TypeName(const TypeName&); \ TypeName(const TypeName&); \
void operator=(const TypeName&) void operator=(const TypeName&)
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE(TypeName, T) \ #define HB_DELETE_CREATE_COPY_ASSIGN_TEMPLATE(TypeName, T) \
TypeName(); \ TypeName(); \
TypeName(const TypeName<T>&); \ TypeName(const TypeName<T>&); \
void operator=(const TypeName<T>&) void operator=(const TypeName<T>&)
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2) \ #define HB_DELETE_CREATE_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2) \
TypeName(); \ TypeName(); \
TypeName(const TypeName<T1, T2>&); \ TypeName(const TypeName<T1, T2>&); \
void operator=(const TypeName<T1, T2>&) void operator=(const TypeName<T1, T2>&)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册