[HB] Remove a few 'inline's, though the compiler mostly ignores them

This commit is contained in:
Behdad Esfahbod 2009-08-06 14:28:18 -04:00
parent 7f3d5c8166
commit 71a8344a5e
3 changed files with 11 additions and 12 deletions

View File

@ -120,7 +120,6 @@ struct TTCHeader
if (version.major < 1 || version.major > 2) return true;
/* XXX Maybe we shouldn't NEUTER these offsets, they may cause a full copy of
* the whole font right now. */
//if (!table.sanitize (SANITIZE_ARG)) return false;
return table.sanitize (SANITIZE_ARG, CONST_CHARP(this), CONST_CHARP(this));
}

View File

@ -499,21 +499,21 @@ struct GenericOffsetTo : OffsetType
return CONST_CAST(Type, *CONST_CHARP(base), offset);
}
inline bool sanitize (SANITIZE_ARG_DEF, const void *base) {
bool sanitize (SANITIZE_ARG_DEF, const void *base) {
SANITIZE_DEBUG ();
if (!SANITIZE_OBJ (*this)) return false;
unsigned int offset = *this;
if (HB_UNLIKELY (!offset)) return true;
return SANITIZE (CAST(Type, *DECONST_CHARP(base), offset)) || NEUTER (DECONST_CAST(OffsetType,*this,0), 0);
}
inline bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
SANITIZE_DEBUG ();
if (!SANITIZE_OBJ (*this)) return false;
unsigned int offset = *this;
if (HB_UNLIKELY (!offset)) return true;
return SANITIZE_BASE (CAST(Type, *DECONST_CHARP(base), offset), base2) || NEUTER (DECONST_CAST(OffsetType,*this,0), 0);
}
inline bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
SANITIZE_DEBUG ();
if (!SANITIZE_OBJ (*this)) return false;
unsigned int offset = *this;
@ -544,7 +544,7 @@ struct GenericArrayOf
inline unsigned int get_size () const
{ return sizeof (len) + len * sizeof (array[0]); }
inline bool sanitize (SANITIZE_ARG_DEF) {
bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
/* Note; for non-recursive types, this is not much needed
@ -555,7 +555,7 @@ struct GenericArrayOf
*/
return true;
}
inline bool sanitize (SANITIZE_ARG_DEF, const void *base) {
bool sanitize (SANITIZE_ARG_DEF, const void *base) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
unsigned int count = len;
@ -564,7 +564,7 @@ struct GenericArrayOf
return false;
return true;
}
inline bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
bool sanitize (SANITIZE_ARG_DEF, const void *base, const void *base2) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
unsigned int count = len;
@ -573,7 +573,7 @@ struct GenericArrayOf
return false;
return true;
}
inline bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
bool sanitize (SANITIZE_ARG_DEF, const void *base, unsigned int user_data) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
unsigned int count = len;
@ -620,7 +620,7 @@ struct HeadlessArrayOf
inline unsigned int get_size () const
{ return sizeof (len) + (len ? len - 1 : 0) * sizeof (array[0]); }
inline bool sanitize (SANITIZE_ARG_DEF) {
bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE_GET_SIZE()) return false;
/* Note; for non-recursive types, this is not much needed

View File

@ -449,7 +449,7 @@ struct Context
}
}
inline bool sanitize (SANITIZE_ARG_DEF) {
bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@ -756,7 +756,7 @@ struct ChainContext
}
}
inline bool sanitize (SANITIZE_ARG_DEF) {
bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {
@ -826,7 +826,7 @@ struct Extension
}
}
inline bool sanitize (SANITIZE_ARG_DEF) {
bool sanitize (SANITIZE_ARG_DEF) {
SANITIZE_DEBUG ();
if (!SANITIZE (u.format)) return false;
switch (u.format) {