From 71a8344a5eeaa34e31d53138cf3bbe30b819f83c Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 6 Aug 2009 14:28:18 -0400 Subject: [PATCH] [HB] Remove a few 'inline's, though the compiler mostly ignores them --- src/hb-open-file-private.hh | 1 - src/hb-open-type-private.hh | 16 ++++++++-------- src/hb-ot-layout-gsubgpos-private.hh | 6 +++--- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/hb-open-file-private.hh b/src/hb-open-file-private.hh index 03d9e141c..0d4912a36 100644 --- a/src/hb-open-file-private.hh +++ b/src/hb-open-file-private.hh @@ -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)); } diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 8c01c6826..e5802032e 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -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 diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 6fce03aee..63ae46334 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -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) {