From 9c0c3589f31106d1898f8922cc9a2e18cb054989 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Fri, 10 May 2019 13:56:50 -0700 Subject: [PATCH] Minor --- src/hb-ot-layout-common.hh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hb-ot-layout-common.hh b/src/hb-ot-layout-common.hh index eca70ad..ac91451 100644 --- a/src/hb-ot-layout-common.hh +++ b/src/hb-ot-layout-common.hh @@ -648,16 +648,19 @@ struct Lookup unsigned int get_subtable_count () const { return subTable.len; } template - const TSubTable& get_subtable (unsigned int i) const - { return this+CastR> (subTable)[i]; } - - template const OffsetArrayOf& get_subtables () const { return CastR> (subTable); } template OffsetArrayOf& get_subtables () { return CastR> (subTable); } + template + const TSubTable& get_subtable (unsigned int i) const + { return this+get_subtables ()[i]; } + template + TSubTable& get_subtable (unsigned int i) + { return this+get_subtables ()[i]; } + unsigned int get_size () const { const HBUINT16 &markFilteringSet = StructAfter (subTable); @@ -745,8 +748,7 @@ struct Lookup if (!markFilteringSet.sanitize (c)) return_trace (false); } - if (unlikely (!CastR> (subTable) - .sanitize (c, this, get_type ()))) + if (unlikely (!get_subtables ().sanitize (c, this, get_type ()))) return_trace (false); if (unlikely (get_type () == TSubTable::Extension)) -- 2.7.4