[colr] Move sanitize

This commit is contained in:
Behdad Esfahbod 2018-10-21 17:43:29 -07:00
parent d440c8d3fb
commit 228fa71bf9

View File

@ -63,15 +63,8 @@ struct LayerRecord
struct BaseGlyphRecord
{
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this)));
}
inline int cmp (hb_codepoint_t g) const {
return g < glyphId ? -1 : g > glyphId ? 1 : 0;
}
inline int cmp (hb_codepoint_t g) const
{ return g < glyphId ? -1 : g > glyphId ? 1 : 0; }
static int cmp (const void *pa, const void *pb)
{
@ -80,6 +73,12 @@ struct BaseGlyphRecord
return b->cmp (*a);
}
inline bool sanitize (hb_sanitize_context_t *c) const
{
TRACE_SANITIZE (this);
return_trace (likely (c->check_struct (this)));
}
public:
GlyphID glyphId; /* Glyph ID of reference glyph */
HBUINT16 firstLayerIdx; /* Index (from beginning of