[colr] Move sanitize
This commit is contained in:
parent
d440c8d3fb
commit
228fa71bf9
|
@ -63,15 +63,8 @@ struct LayerRecord
|
||||||
|
|
||||||
struct BaseGlyphRecord
|
struct BaseGlyphRecord
|
||||||
{
|
{
|
||||||
inline bool sanitize (hb_sanitize_context_t *c) const
|
inline int cmp (hb_codepoint_t g) const
|
||||||
{
|
{ return g < glyphId ? -1 : g > glyphId ? 1 : 0; }
|
||||||
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int cmp (const void *pa, const void *pb)
|
static int cmp (const void *pa, const void *pb)
|
||||||
{
|
{
|
||||||
|
@ -80,6 +73,12 @@ struct BaseGlyphRecord
|
||||||
return b->cmp (*a);
|
return b->cmp (*a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline bool sanitize (hb_sanitize_context_t *c) const
|
||||||
|
{
|
||||||
|
TRACE_SANITIZE (this);
|
||||||
|
return_trace (likely (c->check_struct (this)));
|
||||||
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GlyphID glyphId; /* Glyph ID of reference glyph */
|
GlyphID glyphId; /* Glyph ID of reference glyph */
|
||||||
HBUINT16 firstLayerIdx; /* Index (from beginning of
|
HBUINT16 firstLayerIdx; /* Index (from beginning of
|
||||||
|
|
Loading…
Reference in New Issue