Remove SANITIZE_THIS3

This commit is contained in:
Behdad Esfahbod 2010-05-04 14:47:05 -04:00
parent fbab9f9bd8
commit be74284673
3 changed files with 21 additions and 9 deletions

View File

@ -231,7 +231,6 @@ _hb_sanitize_edit (SANITIZE_ARG_DEF,
#define SANITIZE_THIS(X) likely ((X).sanitize (SANITIZE_ARG, CharP(this))) #define SANITIZE_THIS(X) likely ((X).sanitize (SANITIZE_ARG, CharP(this)))
#define SANITIZE_THIS2(X,Y) (SANITIZE_THIS (X) && SANITIZE_THIS (Y)) #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)) #define SANITIZE_BASE(X,B) likely ((X).sanitize (SANITIZE_ARG, B))

View File

@ -1063,8 +1063,11 @@ struct MarkBasePosFormat1
inline bool sanitize (SANITIZE_ARG_DEF) { inline bool sanitize (SANITIZE_ARG_DEF) {
TRACE_SANITIZE (); TRACE_SANITIZE ();
return SANITIZE_SELF () && SANITIZE_THIS3 (markCoverage, baseCoverage, markArray) && return SANITIZE_SELF ()
likely (baseArray.sanitize (SANITIZE_ARG, CharP(this), classCount)); && SANITIZE_THIS (markCoverage)
&& SANITIZE_THIS (baseCoverage)
&& SANITIZE_THIS (markArray)
&& likely (baseArray.sanitize (SANITIZE_ARG, CharP(this), classCount));
} }
private: private:
@ -1184,8 +1187,11 @@ struct MarkLigPosFormat1
inline bool sanitize (SANITIZE_ARG_DEF) { inline bool sanitize (SANITIZE_ARG_DEF) {
TRACE_SANITIZE (); TRACE_SANITIZE ();
return SANITIZE_SELF () && SANITIZE_THIS3 (markCoverage, ligatureCoverage, markArray) && return SANITIZE_SELF ()
likely (ligatureArray.sanitize (SANITIZE_ARG, CharP(this), classCount)); && SANITIZE_THIS (markCoverage)
&& SANITIZE_THIS (ligatureCoverage)
&& SANITIZE_THIS (markArray)
&& likely (ligatureArray.sanitize (SANITIZE_ARG, CharP(this), classCount));
} }
private: private:
@ -1284,8 +1290,11 @@ struct MarkMarkPosFormat1
inline bool sanitize (SANITIZE_ARG_DEF) { inline bool sanitize (SANITIZE_ARG_DEF) {
TRACE_SANITIZE (); TRACE_SANITIZE ();
return SANITIZE_SELF () && SANITIZE_THIS3 (mark1Coverage, mark2Coverage, mark1Array) && return SANITIZE_SELF ()
likely (mark2Array.sanitize (SANITIZE_ARG, CharP(this), classCount)); && SANITIZE_THIS (mark1Coverage)
&& SANITIZE_THIS (mark2Coverage)
&& SANITIZE_THIS (mark1Array)
&& likely (mark2Array.sanitize (SANITIZE_ARG, CharP(this), classCount));
} }
private: private:

View File

@ -400,7 +400,9 @@ struct ContextFormat2
inline bool sanitize (SANITIZE_ARG_DEF) { inline bool sanitize (SANITIZE_ARG_DEF) {
TRACE_SANITIZE (); TRACE_SANITIZE ();
return SANITIZE_THIS3 (coverage, classDef, ruleSet); return SANITIZE_THIS (coverage)
&& SANITIZE_THIS (classDef)
&& SANITIZE_THIS (ruleSet);
} }
private: private:
@ -913,7 +915,9 @@ struct GSUBGPOS
TRACE_SANITIZE (); TRACE_SANITIZE ();
if (!SANITIZE (version)) return false; if (!SANITIZE (version)) return false;
if (unlikely (version.major != 1)) 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: protected: