diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2010-04-22 00:58:49 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2010-04-22 00:58:49 -0400 |
commit | 81f2af40f9afd5bb9695018e6baddcd4aa3361c1 (patch) | |
tree | 845e69b05d2dae0180b2b00f0445799f79cd43c0 /src | |
parent | 19828ad42d8117563412aae3c70887aa117805a9 (diff) |
Simplify Extension offset now that our int types have no alignment
Diffstat (limited to 'src')
-rw-r--r-- | src/hb-ot-layout-gsubgpos-private.hh | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 5d19c7e..a68e5a4 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -835,10 +835,9 @@ struct ExtensionFormat1 protected: inline unsigned int get_type (void) const { return extensionLookupType; } - inline unsigned int get_offset (void) const { return (extensionOffset[0] << 16) + extensionOffset[1]; } inline const LookupSubTable& get_subtable (void) const { - unsigned int offset = get_offset (); + unsigned int offset = extensionOffset; if (HB_UNLIKELY (!offset)) return Null(LookupSubTable); return CONST_CAST (LookupSubTable, *this, offset); } @@ -853,10 +852,8 @@ struct ExtensionFormat1 USHORT extensionLookupType; /* Lookup type of subtable referenced * by ExtensionOffset (i.e. the * extension subtable). */ - USHORT extensionOffset[2]; /* Offset to the extension subtable, - * of lookup type subtable. - * Defined as two shorts to avoid - * alignment requirements. */ + ULONG extensionOffset; /* Offset to the extension subtable, + * of lookup type subtable. */ }; ASSERT_SIZE (ExtensionFormat1, 8); |