From 4111c3b8cd1b1c44f722877614ec1ee25111e78c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 10 Nov 2018 00:26:36 -0500 Subject: [PATCH] [post] Move sanitize close to data fields --- src/hb-ot-post-table.hh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/hb-ot-post-table.hh b/src/hb-ot-post-table.hh index b7913773e..bbde8d83b 100644 --- a/src/hb-ot-post-table.hh +++ b/src/hb-ot-post-table.hh @@ -73,19 +73,6 @@ struct post { static const hb_tag_t tableTag = HB_OT_TAG_post; - inline bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - if (unlikely (!c->check_struct (this))) - return_trace (false); - if (version.to_int () == 0x00020000) - { - const postV2Tail &v2 = StructAfter (*this); - return_trace (v2.sanitize (c)); - } - return_trace (true); - } - inline bool subset (hb_subset_plan_t *plan) const { unsigned int post_prime_length; @@ -265,6 +252,19 @@ struct post hb_atomic_ptr_t gids_sorted_by_name; }; + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + if (unlikely (!c->check_struct (this))) + return_trace (false); + if (version.to_int () == 0x00020000) + { + const postV2Tail &v2 = StructAfter (*this); + return_trace (v2.sanitize (c)); + } + return_trace (true); + } + public: FixedVersion<>version; /* 0x00010000 for version 1.0 * 0x00020000 for version 2.0