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

View File

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