提交 a6ade347 编写于 作者: B Behdad Esfahbod 提交者: Khaled Hosny

[colr] Move sanitize() to right place

Sanitize always comes just before data member definitions, so
it's easy to cross-check.
上级 24adc157
...@@ -97,14 +97,6 @@ struct COLR ...@@ -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 ...@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册