From cd9bc732a75c716121a86e39ab588d2e0af58eba Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 May 2019 13:17:41 -0700 Subject: [PATCH] [gsubgpos] Minor --- src/hb-ot-layout-gsubgpos.hh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/hb-ot-layout-gsubgpos.hh b/src/hb-ot-layout-gsubgpos.hh index 3d4a1bc..3fb6829 100644 --- a/src/hb-ot-layout-gsubgpos.hh +++ b/src/hb-ot-layout-gsubgpos.hh @@ -2504,11 +2504,7 @@ struct ExtensionFormat1 template const X& get_subtable () const - { - unsigned int offset = extensionOffset; - if (unlikely (!offset)) return Null(typename T::SubTable); - return StructAtOffset (this, offset); - } + { return this + (LOffsetTo&) extensionOffset; } template typename context_t::return_t dispatch (context_t *c, Ts&&... ds) const @@ -2523,7 +2519,6 @@ struct ExtensionFormat1 { TRACE_SANITIZE (this); return_trace (c->check_struct (this) && - extensionOffset != 0 && extensionLookupType != T::SubTable::Extension); } @@ -2532,7 +2527,7 @@ struct ExtensionFormat1 HBUINT16 extensionLookupType; /* Lookup type of subtable referenced * by ExtensionOffset (i.e. the * extension subtable). */ - HBUINT32 extensionOffset; /* Offset to the extension subtable, + Offset32 extensionOffset; /* Offset to the extension subtable, * of lookup type subtable. */ public: DEFINE_SIZE_STATIC (8); -- 2.7.4