Add HB_NO_CREATE_COPY_ASSIGN
This commit is contained in:
parent
5b563640b2
commit
ea0e51d1b1
|
@ -335,7 +335,7 @@ static inline Type& operator + (Base &base, OffsetTo<Type, OffsetType, has_null>
|
|||
template <typename Type>
|
||||
struct UnsizedArrayOf
|
||||
{
|
||||
HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE (UnsizedArrayOf, Type);
|
||||
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE (UnsizedArrayOf, Type);
|
||||
|
||||
inline const Type& operator [] (unsigned int i) const { return arrayZ[i]; }
|
||||
inline Type& operator [] (unsigned int i) { return arrayZ[i]; }
|
||||
|
@ -426,7 +426,7 @@ struct UnsizedOffsetListOf : UnsizedOffsetArrayOf<Type, OffsetType, has_null>
|
|||
template <typename Type, typename LenType=HBUINT16>
|
||||
struct ArrayOf
|
||||
{
|
||||
HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE2 (ArrayOf, Type, LenType);
|
||||
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (ArrayOf, Type, LenType);
|
||||
|
||||
inline const Type *sub_array (unsigned int start_offset, unsigned int *pcount /* IN/OUT */) const
|
||||
{
|
||||
|
@ -593,7 +593,7 @@ struct OffsetListOf : OffsetArrayOf<Type>
|
|||
template <typename Type, typename LenType=HBUINT16>
|
||||
struct HeadlessArrayOf
|
||||
{
|
||||
HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE2 (HeadlessArrayOf, Type, LenType);
|
||||
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (HeadlessArrayOf, Type, LenType);
|
||||
|
||||
inline const Type& operator [] (unsigned int i) const
|
||||
{
|
||||
|
@ -659,7 +659,7 @@ struct HeadlessArrayOf
|
|||
template <typename Type, typename LenType=HBUINT16>
|
||||
struct ArrayOfM1
|
||||
{
|
||||
HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE2 (ArrayOfM1, Type, LenType);
|
||||
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2 (ArrayOfM1, Type, LenType);
|
||||
|
||||
inline const Type& operator [] (unsigned int i) const
|
||||
{
|
||||
|
@ -791,7 +791,7 @@ struct VarSizedBinSearchHeader
|
|||
template <typename Type>
|
||||
struct VarSizedBinSearchArrayOf
|
||||
{
|
||||
HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE (VarSizedBinSearchArrayOf, Type);
|
||||
HB_NO_CREATE_COPY_ASSIGN_TEMPLATE (VarSizedBinSearchArrayOf, Type);
|
||||
|
||||
inline const Type& operator [] (unsigned int i) const
|
||||
{
|
||||
|
|
15
src/hb.hh
15
src/hb.hh
|
@ -339,21 +339,24 @@ static_assert ((sizeof (hb_var_int_t) == 4), "");
|
|||
|
||||
#if __cplusplus >= 201103L
|
||||
|
||||
#define HB_DISALLOW_COPY_AND_ASSIGN(TypeName) \
|
||||
#define HB_NO_CREATE_COPY_ASSIGN(TypeName) \
|
||||
TypeName(void); \
|
||||
TypeName(const TypeName&); \
|
||||
void operator=(const TypeName&)
|
||||
#define HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE(TypeName, T) \
|
||||
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE(TypeName, T) \
|
||||
TypeName(void); \
|
||||
TypeName(const TypeName<T>&); \
|
||||
void operator=(const TypeName<T>&)
|
||||
#define HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE2(TypeName, T1, T2) \
|
||||
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2) \
|
||||
TypeName(void); \
|
||||
TypeName(const TypeName<T1, T2>&); \
|
||||
void operator=(const TypeName<T1, T2>&);
|
||||
|
||||
#else /* __cpluspplus >= 201103L */
|
||||
|
||||
#define HB_DISALLOW_COPY_AND_ASSIGN(TypeName)
|
||||
#define HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE(TypeName, T)
|
||||
#define HB_DISALLOW_COPY_AND_ASSIGN_TEMPLATE2(TypeName, T1, T2)
|
||||
#define HB_NO_CREATE_COPY_ASSIGN(TypeName)
|
||||
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE(TypeName, T)
|
||||
#define HB_NO_CREATE_COPY_ASSIGN_TEMPLATE2(TypeName, T1, T2)
|
||||
|
||||
#endif /* __cpluspplus >= 201103L */
|
||||
|
||||
|
|
Loading…
Reference in New Issue