[aat/kerx] Minor (#1003)

This commit is contained in:
Ebrahim Byagowi 2018-04-20 21:12:58 +04:30 committed by GitHub
parent ce17340b23
commit 2a4cdfad20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 24 additions and 22 deletions

View File

@ -30,6 +30,7 @@
#include "hb-open-type-private.hh" #include "hb-open-type-private.hh"
#include "hb-aat-layout-common-private.hh" #include "hb-aat-layout-common-private.hh"
#include "hb-aat-layout-ankr-table.hh"
/* /*
* kerx -- Extended Kerning * kerx -- Extended Kerning
@ -48,7 +49,7 @@ struct KerxFormat0Records
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this)); return_trace (likely (c->check_struct (this)));
} }
protected: protected:
@ -74,8 +75,8 @@ struct KerxSubTableFormat0
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
recordsZ.sanitize (c, nPairs)); recordsZ.sanitize (c, nPairs)));
} }
protected: protected:
@ -98,8 +99,8 @@ struct KerxSubTableFormat1
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
stateHeader.sanitize (c)); stateHeader.sanitize (c)));
} }
protected: protected:
@ -117,7 +118,8 @@ struct KerxClassTable
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (firstGlyph.sanitize (c) && classes.sanitize (c)); return_trace (likely (firstGlyph.sanitize (c) &&
classes.sanitize (c)));
} }
protected: protected:
@ -146,11 +148,11 @@ struct KerxSubTableFormat2
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
rowWidth.sanitize (c) && rowWidth.sanitize (c) &&
leftClassTable.sanitize (c, this) && leftClassTable.sanitize (c, this) &&
rightClassTable.sanitize (c, this) && rightClassTable.sanitize (c, this) &&
array.sanitize (c, this)); array.sanitize (c, this)));
} }
protected: protected:
@ -173,11 +175,11 @@ struct KerxSubTableFormat4
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
rowWidth.sanitize (c) && rowWidth.sanitize (c) &&
leftClassTable.sanitize (c, this) && leftClassTable.sanitize (c, this) &&
rightClassTable.sanitize (c, this) && rightClassTable.sanitize (c, this) &&
array.sanitize (c, this)); array.sanitize (c, this)));
} }
protected: protected:
@ -200,11 +202,11 @@ struct KerxSubTableFormat6
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
rowIndexTable.sanitize (c, this) && rowIndexTable.sanitize (c, this) &&
columnIndexTable.sanitize (c, this) && columnIndexTable.sanitize (c, this) &&
kerningArray.sanitize (c, this) && kerningArray.sanitize (c, this) &&
kerningVector.sanitize (c, this)); kerningVector.sanitize (c, this)));
} }
protected: protected:
@ -276,7 +278,7 @@ struct SubtableGlyphCoverageArray
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this)); return_trace (likely (c->check_struct (this)));
} }
protected: protected: