[aat] Minor (#1369)

This commit is contained in:
Ebrahim Byagowi 2018-11-08 20:48:54 +03:30 committed by GitHub
parent f90423847b
commit b989507fa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 11 deletions

View File

@ -178,6 +178,8 @@ struct RepeatedAddGlyphAction
struct ActionSubrecord struct ActionSubrecord
{ {
inline unsigned int get_length (void) const { return u.header.actionLength; }
inline bool sanitize (hb_sanitize_context_t *c) const inline bool sanitize (hb_sanitize_context_t *c) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
@ -196,8 +198,6 @@ struct ActionSubrecord
} }
} }
inline unsigned int get_length () const { return u.header.actionLength; }
protected: protected:
union { union {
ActionSubrecordHeader header; ActionSubrecordHeader header;
@ -388,7 +388,8 @@ struct just
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (unlikely (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
version.major == 1 &&
horizData.sanitize (c, this, this) && horizData.sanitize (c, this, this) &&
vertData.sanitize (c, this, this))); vertData.sanitize (c, this, this)));
} }

View File

@ -147,9 +147,9 @@ struct TrackData
inline bool sanitize (hb_sanitize_context_t *c, const void *base) const inline bool sanitize (hb_sanitize_context_t *c, const void *base) const
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
sizeTable.sanitize (c, base, nSizes) && sizeTable.sanitize (c, base, nSizes) &&
trackTable.sanitize (c, nTracks, base, nSizes)); trackTable.sanitize (c, nTracks, base, nSizes)));
} }
protected: protected:
@ -175,7 +175,7 @@ struct trak
{ {
TRACE_SANITIZE (this); TRACE_SANITIZE (this);
return_trace (unlikely (c->check_struct (this) && return_trace (likely (c->check_struct (this) &&
horizData.sanitize (c, this, this) && horizData.sanitize (c, this, this) &&
vertData.sanitize (c, this, this))); vertData.sanitize (c, this, this)));
} }