diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index 9713da064..da2f0cda4 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -231,7 +231,6 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF, #define SANITIZE_THIS(X) likely ((X).sanitize (SANITIZE_ARG, CharP(this))) #define SANITIZE_THIS2(X,Y) (SANITIZE_THIS (X) && SANITIZE_THIS (Y)) -#define SANITIZE_THIS3(X,Y,Z) (SANITIZE_THIS (X) && SANITIZE_THIS (Y) && SANITIZE_THIS(Z)) #define SANITIZE_BASE(X,B) likely ((X).sanitize (SANITIZE_ARG, B)) diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh index 5736a5fba..6504077e1 100644 --- a/src/hb-ot-layout-gpos-private.hh +++ b/src/hb-ot-layout-gpos-private.hh @@ -1063,8 +1063,11 @@ struct MarkBasePosFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_SELF () && SANITIZE_THIS3 (markCoverage, baseCoverage, markArray) && - likely (baseArray.sanitize (SANITIZE_ARG, CharP(this), classCount)); + return SANITIZE_SELF () + && SANITIZE_THIS (markCoverage) + && SANITIZE_THIS (baseCoverage) + && SANITIZE_THIS (markArray) + && likely (baseArray.sanitize (SANITIZE_ARG, CharP(this), classCount)); } private: @@ -1184,8 +1187,11 @@ struct MarkLigPosFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_SELF () && SANITIZE_THIS3 (markCoverage, ligatureCoverage, markArray) && - likely (ligatureArray.sanitize (SANITIZE_ARG, CharP(this), classCount)); + return SANITIZE_SELF () + && SANITIZE_THIS (markCoverage) + && SANITIZE_THIS (ligatureCoverage) + && SANITIZE_THIS (markArray) + && likely (ligatureArray.sanitize (SANITIZE_ARG, CharP(this), classCount)); } private: @@ -1284,8 +1290,11 @@ struct MarkMarkPosFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_SELF () && SANITIZE_THIS3 (mark1Coverage, mark2Coverage, mark1Array) && - likely (mark2Array.sanitize (SANITIZE_ARG, CharP(this), classCount)); + return SANITIZE_SELF () + && SANITIZE_THIS (mark1Coverage) + && SANITIZE_THIS (mark2Coverage) + && SANITIZE_THIS (mark1Array) + && likely (mark2Array.sanitize (SANITIZE_ARG, CharP(this), classCount)); } private: diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index 280860101..f945ed98e 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -400,7 +400,9 @@ struct ContextFormat2 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS3 (coverage, classDef, ruleSet); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (classDef) + && SANITIZE_THIS (ruleSet); } private: @@ -913,7 +915,9 @@ struct GSUBGPOS TRACE_SANITIZE (); if (!SANITIZE (version)) return false; if (unlikely (version.major != 1)) return false; - return SANITIZE_THIS3 (scriptList, featureList, lookupList); + return SANITIZE_THIS (scriptList) + && SANITIZE_THIS (featureList) + && SANITIZE_THIS (lookupList); } protected: