diff --git a/src/hb-ot-layout-gdef-private.h b/src/hb-ot-layout-gdef-private.h index 267d38a2de67c7ab01be3a0d11d9a2d44dfd6769..3e88cc408293e53d477b923ef115da48782c47db 100644 --- a/src/hb-ot-layout-gdef-private.h +++ b/src/hb-ot-layout-gdef-private.h @@ -149,8 +149,6 @@ struct CaretValueFormat3 { ASSERT_SIZE (CaretValueFormat3, 6); struct CaretValue { - DEFINE_NON_INSTANTIABLE(CaretValue); - /* XXX we need access to a load-contour-point vfunc here */ int get_caret_value (int ppem) const { switch (u.caretValueFormat) { diff --git a/src/hb-ot-layout-gsub-private.h b/src/hb-ot-layout-gsub-private.h index 0e6182114ad1549222f828eca203521e4c67812b..568f14da81f30f44048bfe6a5199c0f8f2b81c66 100644 --- a/src/hb-ot-layout-gsub-private.h +++ b/src/hb-ot-layout-gsub-private.h @@ -997,7 +997,6 @@ enum { }; struct SubstLookupSubTable { - DEFINE_NON_INSTANTIABLE(SubstLookupSubTable); friend struct SubstLookup; @@ -1052,8 +1051,6 @@ inline bool ExtensionSubstFormat1::substitute (SUBTABLE_SUBSTITUTE_ARGS_DEF) con struct SubstLookup : Lookup { - DEFINE_NON_INSTANTIABLE(SubstLookup); - inline const SubstLookupSubTable& get_subtable (unsigned int i) const { return *(SubstLookupSubTable*)&(((Lookup *)this)->get_subtable (i)); } diff --git a/src/hb-ot-layout-open-private.h b/src/hb-ot-layout-open-private.h index a8a14400b4602c49cf95d4b75a9398456109e384..98cbdd231c7dcdfc4e372c4e2feaee7c89238a22 100644 --- a/src/hb-ot-layout-open-private.h +++ b/src/hb-ot-layout-open-private.h @@ -184,12 +184,6 @@ * Class features */ -/* makes class uninstantiable. should be used for union classes that don't - * contain any complete type */ -#define DEFINE_NON_INSTANTIABLE(Type) \ - protected: inline Type() {} /* cannot be instantiated */ \ - public: - // TODO use a global nul-array for most Null's /* defines Null##Type as a safe nil instance of Type */ #define DEFINE_NULL_DATA(Type, size, data) \ @@ -440,7 +434,7 @@ DEFINE_NULL_ASSERT_SIZE (TTCHeader, 12); */ struct OpenTypeFontFile { - DEFINE_NON_INSTANTIABLE(OpenTypeFontFile); + static const hb_tag_t TrueTypeTag = HB_TAG ( 0 , 1 , 0 , 0 ); static const hb_tag_t CFFTag = HB_TAG ('O','T','T','O'); static const hb_tag_t TTCTag = HB_TAG ('t','t','c','f'); @@ -648,8 +642,6 @@ struct LookupFlag : USHORT { DEFINE_NULL_ASSERT_SIZE (LookupFlag, 2); struct LookupSubTable { - DEFINE_NON_INSTANTIABLE(LookupSubTable); - private: USHORT format; /* Subtable format. Different for GSUB and GPOS */ }; @@ -657,8 +649,6 @@ DEFINE_NULL_ASSERT_SIZE (LookupSubTable, 2); struct Lookup { - DEFINE_NON_INSTANTIABLE(Lookup); - DEFINE_ARRAY_INTERFACE (LookupSubTable, subtable); /* get_subtable_count(), get_subtable(i) */ inline bool is_right_to_left (void) const { return lookupFlag & LookupFlag::RightToLeft; } @@ -778,8 +768,6 @@ struct CoverageFormat2 { ASSERT_SIZE (CoverageFormat2, 4); struct Coverage { - DEFINE_NON_INSTANTIABLE(Coverage); - unsigned int get_coverage (hb_codepoint_t glyph_id) const { switch (u.coverageFormat) { case 1: return u.format1.get_coverage(glyph_id); @@ -869,8 +857,6 @@ struct ClassDefFormat2 { ASSERT_SIZE (ClassDefFormat2, 4); struct ClassDef { - DEFINE_NON_INSTANTIABLE(ClassDef); - hb_ot_layout_class_t get_class (hb_codepoint_t glyph_id) const { switch (u.classFormat) { case 1: return u.format1.get_class(glyph_id); @@ -893,8 +879,6 @@ DEFINE_NULL (ClassDef, 2); */ struct Device { - DEFINE_NON_INSTANTIABLE(Device); - int get_delta (int ppem_size) const { if (ppem_size >= startSize && ppem_size <= endSize && deltaFormat >= 1 && deltaFormat <= 3) {