From a6ade3471e730d7a8b56e4ed706a8eb126e957f6 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sun, 21 Oct 2018 17:39:39 -0700 Subject: [PATCH] [colr] Move sanitize() to right place Sanitize always comes just before data member definitions, so it's easy to cross-check. --- src/hb-ot-color-colr-table.hh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/hb-ot-color-colr-table.hh b/src/hb-ot-color-colr-table.hh index a87a567be..8f81cfb2d 100644 --- a/src/hb-ot-color-colr-table.hh +++ b/src/hb-ot-color-colr-table.hh @@ -97,14 +97,6 @@ struct COLR { static const hb_tag_t tableTag = HB_OT_TAG_COLR; - inline bool sanitize (hb_sanitize_context_t *c) const - { - TRACE_SANITIZE (this); - return_trace (likely (c->check_struct (this) && - (this+baseGlyphsZ).sanitize (c, numBaseGlyphs) && - (this+layersZ).sanitize (c, numLayers))); - } - inline bool get_base_glyph_record (hb_codepoint_t glyph_id, unsigned int *first_layer /* OUT */, unsigned int *num_layers /* OUT */) const @@ -136,6 +128,14 @@ struct COLR return true; } + inline bool sanitize (hb_sanitize_context_t *c) const + { + TRACE_SANITIZE (this); + return_trace (likely (c->check_struct (this) && + (this+baseGlyphsZ).sanitize (c, numBaseGlyphs) && + (this+layersZ).sanitize (c, numLayers))); + } + protected: HBUINT16 version; /* Table version number */ HBUINT16 numBaseGlyphs; /* Number of Base Glyph Records */