Fix a whitespace inconsistency

Null() and Crap() are only places that there's no space before '('...
This commit is contained in:
Behdad Esfahbod 2018-05-31 19:52:16 -07:00
parent e36cd1dfd3
commit 353f4d2efc
3 changed files with 8 additions and 8 deletions

View File

@ -341,7 +341,7 @@ struct NE_TYPEINFO
{ {
const NE_TYPEINFO& next = OT::StructAfter<NE_TYPEINFO> (*this); const NE_TYPEINFO& next = OT::StructAfter<NE_TYPEINFO> (*this);
if (type_id == 0) if (type_id == 0)
return Null (NE_TYPEINFO); return Null(NE_TYPEINFO);
return next; return next;
} }
@ -349,7 +349,7 @@ struct NE_TYPEINFO
{ {
if (idx < count) if (idx < count)
return resources[idx].get_font (base, shift); return resources[idx].get_font (base, shift);
return Null (LE_FONTINFO16); return Null(LE_FONTINFO16);
} }
inline unsigned int get_count () const inline unsigned int get_count () const
@ -398,7 +398,7 @@ struct NE_RESOURCE_TABLE
return_trace (false); return_trace (false);
const NE_TYPEINFO* n = &chain; const NE_TYPEINFO* n = &chain;
while (n != &Null (NE_TYPEINFO) && c->check_struct (n) && n->get_type_id () != 0) while (n != &Null(NE_TYPEINFO) && c->check_struct (n) && n->get_type_id () != 0)
{ {
if (n->get_type_id () == NE_TYPEINFO::FONT) if (n->get_type_id () == NE_TYPEINFO::FONT)
return_trace (n->sanitize (c, base, alignmentShiftCount)); return_trace (n->sanitize (c, base, alignmentShiftCount));
@ -415,13 +415,13 @@ struct NE_RESOURCE_TABLE
inline const NE_TYPEINFO& get_fonts_entry () const inline const NE_TYPEINFO& get_fonts_entry () const
{ {
const NE_TYPEINFO* n = &chain; const NE_TYPEINFO* n = &chain;
while (n != &Null (NE_TYPEINFO) && n->get_type_id () != 0) while (n != &Null(NE_TYPEINFO) && n->get_type_id () != 0)
{ {
if (n->get_type_id () == NE_TYPEINFO::FONT) if (n->get_type_id () == NE_TYPEINFO::FONT)
return *n; return *n;
n = &n->next(); n = &n->next();
} }
return Null (NE_TYPEINFO); return Null(NE_TYPEINFO);
} }
protected: protected:
@ -444,7 +444,7 @@ struct LE_IMAGE_OS2_HEADER
inline const NE_RESOURCE_TABLE& get_resource_table () const inline const NE_RESOURCE_TABLE& get_resource_table () const
{ {
if (magic != 0x454E) // Only NE containers are support for now, NE == 0x454E if (magic != 0x454E) // Only NE containers are support for now, NE == 0x454E
return Null (NE_RESOURCE_TABLE); return Null(NE_RESOURCE_TABLE);
return this+rsrctab; return this+rsrctab;
} }

View File

@ -645,7 +645,7 @@ struct hb_vector_t
inline const Type& operator [] (unsigned int i) const inline const Type& operator [] (unsigned int i) const
{ {
if (unlikely (i >= len)) if (unlikely (i >= len))
return Null (Type); return Null(Type);
return arrayZ[i]; return arrayZ[i];
} }

View File

@ -54,7 +54,7 @@ main (int argc, char **argv)
Sanitizer<OpenTypeFontFile> sanitizer; Sanitizer<OpenTypeFontFile> sanitizer;
hb_blob_t *font_blob = sanitizer.sanitize (blob); hb_blob_t *font_blob = sanitizer.sanitize (blob);
const OpenTypeFontFile* sanitized = font_blob->as<OpenTypeFontFile> (); const OpenTypeFontFile* sanitized = font_blob->as<OpenTypeFontFile> ();
if (sanitized == &Null (OpenTypeFontFile)) if (sanitized == &Null(OpenTypeFontFile))
{ {
printf ("Sanitization of the file wasn't successful. Exit"); printf ("Sanitization of the file wasn't successful. Exit");
return 1; return 1;