[pango/harfbuzz-ng: 17/17] [HB] Remove DEFINE_NON_INSTANTIABLE
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Subject: [pango/harfbuzz-ng: 17/17] [HB] Remove DEFINE_NON_INSTANTIABLE
- Date: Tue, 12 May 2009 03:31:44 -0400 (EDT)
commit 9042dae8a1a4f4727a49b220f13487d50bc2e6fb
Author: Behdad Esfahbod <behdad behdad org>
Date: Fri May 8 21:17:56 2009 -0400
[HB] Remove DEFINE_NON_INSTANTIABLE
---
pango/opentype/hb-ot-layout-gdef-private.h | 2 --
pango/opentype/hb-ot-layout-gsub-private.h | 3 ---
pango/opentype/hb-ot-layout-open-private.h | 18 +-----------------
3 files changed, 1 insertions(+), 22 deletions(-)
diff --git a/pango/opentype/hb-ot-layout-gdef-private.h b/pango/opentype/hb-ot-layout-gdef-private.h
index 267d38a..3e88cc4 100644
--- a/pango/opentype/hb-ot-layout-gdef-private.h
+++ b/pango/opentype/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/pango/opentype/hb-ot-layout-gsub-private.h b/pango/opentype/hb-ot-layout-gsub-private.h
index 0e61821..568f14d 100644
--- a/pango/opentype/hb-ot-layout-gsub-private.h
+++ b/pango/opentype/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/pango/opentype/hb-ot-layout-open-private.h b/pango/opentype/hb-ot-layout-open-private.h
index a8a1440..98cbdd2 100644
--- a/pango/opentype/hb-ot-layout-open-private.h
+++ b/pango/opentype/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) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]