diff --git a/src/hb-open-type-private.hh b/src/hb-open-type-private.hh index da2f0cda4..7f442d060 100644 --- a/src/hb-open-type-private.hh +++ b/src/hb-open-type-private.hh @@ -230,8 +230,6 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF, #define SANITIZE(X) likely ((X).sanitize (SANITIZE_ARG)) #define SANITIZE_THIS(X) likely ((X).sanitize (SANITIZE_ARG, CharP(this))) -#define SANITIZE_THIS2(X,Y) (SANITIZE_THIS (X) && SANITIZE_THIS (Y)) - #define SANITIZE_BASE(X,B) likely ((X).sanitize (SANITIZE_ARG, B)) #define SANITIZE_SELF() SANITIZE_OBJ (*this) diff --git a/src/hb-ot-layout-common-private.hh b/src/hb-ot-layout-common-private.hh index 94bbff384..7ecc5bdd5 100644 --- a/src/hb-ot-layout-common-private.hh +++ b/src/hb-ot-layout-common-private.hh @@ -202,7 +202,8 @@ struct Script inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (defaultLangSys, langSys); + return SANITIZE_THIS (defaultLangSys) + && SANITIZE_THIS (langSys); } private: diff --git a/src/hb-ot-layout-gdef-private.hh b/src/hb-ot-layout-gdef-private.hh index c1e021b63..e5d092e36 100644 --- a/src/hb-ot-layout-gdef-private.hh +++ b/src/hb-ot-layout-gdef-private.hh @@ -69,7 +69,8 @@ struct AttachList inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, attachPoint); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (attachPoint); } private: @@ -244,7 +245,8 @@ struct LigCaretList inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, ligGlyph); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (ligGlyph); } private: @@ -349,8 +351,8 @@ struct GDEF inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); return SANITIZE (version) && likely (version.major == 1) && - SANITIZE_THIS2 (glyphClassDef, attachList) && - SANITIZE_THIS2 (ligCaretList, markAttachClassDef) && + SANITIZE_THIS (glyphClassDef) && SANITIZE_THIS (attachList) && + SANITIZE_THIS (ligCaretList) && SANITIZE_THIS (markAttachClassDef) && (version < 0x00010002 || SANITIZE_THIS (markGlyphSetsDef[0])); } diff --git a/src/hb-ot-layout-gpos-private.hh b/src/hb-ot-layout-gpos-private.hh index 6504077e1..4fce10aa8 100644 --- a/src/hb-ot-layout-gpos-private.hh +++ b/src/hb-ot-layout-gpos-private.hh @@ -270,7 +270,9 @@ struct AnchorFormat3 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_SELF () && SANITIZE_THIS2 (xDeviceTable, yDeviceTable); + return SANITIZE_SELF () + && SANITIZE_THIS (xDeviceTable) + && SANITIZE_THIS (yDeviceTable); } private: @@ -698,7 +700,7 @@ struct PairPosFormat2 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); if (!(SANITIZE_SELF () && SANITIZE_THIS (coverage) && - SANITIZE_THIS2 (classDef1, classDef2))) return false; + SANITIZE_THIS (classDef1) && SANITIZE_THIS (classDef2))) return false; unsigned int len1 = valueFormat1.get_len (); unsigned int len2 = valueFormat2.get_len (); @@ -976,7 +978,8 @@ struct CursivePosFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, entryExitRecord); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (entryExitRecord); } private: diff --git a/src/hb-ot-layout-gsub-private.hh b/src/hb-ot-layout-gsub-private.hh index d2890b09e..170ec9636 100644 --- a/src/hb-ot-layout-gsub-private.hh +++ b/src/hb-ot-layout-gsub-private.hh @@ -208,7 +208,8 @@ struct MultipleSubstFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, sequence); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (sequence); } private: @@ -303,7 +304,8 @@ struct AlternateSubstFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, alternateSet); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (alternateSet); } private: @@ -486,7 +488,8 @@ struct LigatureSubstFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, ligatureSet); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (ligatureSet); } private: @@ -616,7 +619,7 @@ struct ReverseChainSingleSubstFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - if (!SANITIZE_THIS2 (coverage, backtrack)) + if (!(SANITIZE_THIS (coverage) && SANITIZE_THIS (backtrack))) return false; OffsetArrayOf &lookahead = StructAfter > (backtrack); if (!SANITIZE_THIS (lookahead)) diff --git a/src/hb-ot-layout-gsubgpos-private.hh b/src/hb-ot-layout-gsubgpos-private.hh index d07fe25b3..63239e525 100644 --- a/src/hb-ot-layout-gsubgpos-private.hh +++ b/src/hb-ot-layout-gsubgpos-private.hh @@ -358,7 +358,8 @@ struct ContextFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, ruleSet); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (ruleSet); } private: @@ -644,7 +645,8 @@ struct ChainContextFormat1 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, ruleSet); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (ruleSet); } private: @@ -690,9 +692,11 @@ struct ChainContextFormat2 inline bool sanitize (SANITIZE_ARG_DEF) { TRACE_SANITIZE (); - return SANITIZE_THIS2 (coverage, backtrackClassDef) && - SANITIZE_THIS2 (inputClassDef, lookaheadClassDef) && - SANITIZE_THIS (ruleSet); + return SANITIZE_THIS (coverage) + && SANITIZE_THIS (backtrackClassDef) + && SANITIZE_THIS (inputClassDef) + && SANITIZE_THIS (lookaheadClassDef) + && SANITIZE_THIS (ruleSet); } private: