From 243d20e011e251462a07947275e0e98cc19c7e9b Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 21 Apr 2010 23:57:01 -0400 Subject: [PATCH] More cast simplification --- src/hb-open-type-private.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 3ae134db3..0cdffbd69 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -484,21 +484,21 @@ struct GenericOffsetTo : OffsetType if (!SANITIZE_SELF ()) return false; unsigned int offset = *this; if (HB_UNLIKELY (!offset)) return true; - return SANITIZE (CAST(Type, *CharP(base), offset)) || NEUTER (DECONST_CAST(OffsetType,*this,0), 0); + return SANITIZE (CAST(Type, *CharP(base), offset)) || NEUTER (CAST(OffsetType,*this,0), 0); } inline bool sanitize (SANITIZE_ARG_DEF, void *base, void *base2) { TRACE_SANITIZE (); if (!SANITIZE_SELF ()) return false; unsigned int offset = *this; if (HB_UNLIKELY (!offset)) return true; - return SANITIZE_BASE (CAST(Type, *CharP(base), offset), base2) || NEUTER (DECONST_CAST(OffsetType,*this,0), 0); + return SANITIZE_BASE (CAST(Type, *CharP(base), offset), base2) || NEUTER (CAST(OffsetType,*this,0), 0); } inline bool sanitize (SANITIZE_ARG_DEF, void *base, unsigned int user_data) { TRACE_SANITIZE (); if (!SANITIZE_SELF ()) return false; unsigned int offset = *this; if (HB_UNLIKELY (!offset)) return true; - return SANITIZE_BASE (CAST(Type, *CharP(base), offset), user_data) || NEUTER (DECONST_CAST(OffsetType,*this,0), 0); + return SANITIZE_BASE (CAST(Type, *CharP(base), offset), user_data) || NEUTER (CAST(OffsetType,*this,0), 0); } }; template