[colr] Move sanitize() to right place

Sanitize always comes just before data member definitions, so
it's easy to cross-check.
This commit is contained in:
Behdad Esfahbod 2018-10-21 17:39:39 -07:00 committed by Khaled Hosny
parent 24adc15757
commit a6ade3471e
1 changed files with 8 additions and 8 deletions

View File

@ -97,14 +97,6 @@ struct COLR
{ {
static const hb_tag_t tableTag = HB_OT_TAG_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, inline bool get_base_glyph_record (hb_codepoint_t glyph_id,
unsigned int *first_layer /* OUT */, unsigned int *first_layer /* OUT */,
unsigned int *num_layers /* OUT */) const unsigned int *num_layers /* OUT */) const
@ -136,6 +128,14 @@ struct COLR
return true; 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: protected:
HBUINT16 version; /* Table version number */ HBUINT16 version; /* Table version number */
HBUINT16 numBaseGlyphs; /* Number of Base Glyph Records */ HBUINT16 numBaseGlyphs; /* Number of Base Glyph Records */