From a21b5062cc32c04eeee3c4b20d26c7e2b34133e9 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 23 May 2009 22:39:42 -0400 Subject: [PATCH] [HB] Minor --- src/hb-ot-layout-gdef-private.h | 6 +++--- src/hb-ot-layout-open-private.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hb-ot-layout-gdef-private.h b/src/hb-ot-layout-gdef-private.h index d68d9efe0..b41c3273d 100644 --- a/src/hb-ot-layout-gdef-private.h +++ b/src/hb-ot-layout-gdef-private.h @@ -199,17 +199,17 @@ struct GDEF /* XXX check version here? */ inline bool has_glyph_classes () const { return glyphClassDef != 0; } - inline hb_ot_layout_class_t get_glyph_class (hb_codepoint_t glyph) const { return glyphClassDef(this).get_class (glyph); } + inline hb_ot_layout_class_t get_glyph_class (hb_codepoint_t glyph) const { return (this+glyphClassDef).get_class (glyph); } inline bool has_mark_attachment_types () const { return markAttachClassDef != 0; } - inline hb_ot_layout_class_t get_mark_attachment_type (hb_codepoint_t glyph) const { return markAttachClassDef(this).get_class (glyph); } + inline hb_ot_layout_class_t get_mark_attachment_type (hb_codepoint_t glyph) const { return (this+markAttachClassDef).get_class (glyph); } /* TODO get_attach and get_lig_caret */ inline bool has_attach_list () const { return attachList != 0; } inline bool has_lig_caret_list () const { return ligCaretList != 0; } private: - Fixed version; /* Version of the GDEF table--initially + Fixed_Version version; /* Version of the GDEF table--initially * 0x00010000 */ OffsetTo glyphClassDef; /* Offset to class definition table diff --git a/src/hb-ot-layout-open-private.h b/src/hb-ot-layout-open-private.h index e5f697c01..08ff152b4 100644 --- a/src/hb-ot-layout-open-private.h +++ b/src/hb-ot-layout-open-private.h @@ -173,7 +173,6 @@ struct Null \ if (HB_UNLIKELY (data == NULL)) return Null(Type); \ return (const Type&)*data; \ } \ - static inline Type& get_for_data (char *data) { return (Type&)*data; } @@ -511,7 +510,8 @@ struct OpenTypeFontFile { if (HB_UNLIKELY (i >= get_len ())) return Null(OpenTypeFontFace); switch (tag) { - default: case TrueTypeTag: case CFFTag: return (const OffsetTable&)*this; + default: /* Never happens because of the if above */ + case TrueTypeTag: case CFFTag: return (const OffsetTable&)*this; case TTCTag: return ((const TTCHeader&)*this)[i]; } }