diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index 69c53c3349..95fff7d656 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -154,7 +154,7 @@ inline void operator delete(void* p) { }) #define SkDEBUGFAIL(message) SK_ABORT(message) #define SkDEBUGFAILF(fmt, ...) SkASSERTF(false, fmt, ##__VA_ARGS__) - #define SkDEBUGCODE(code) code + #define SkDEBUGCODE(...) __VA_ARGS__ #define SkDECLAREPARAM(type, var) , type var #define SkPARAM(var) , var #define SkDEBUGF(args ) SkDebugf args @@ -163,7 +163,7 @@ inline void operator delete(void* p) { #define SkASSERT(cond) #define SkASSERTF(cond, fmt, ...) #define SkDEBUGFAIL(message) - #define SkDEBUGCODE(code) + #define SkDEBUGCODE(...) #define SkDEBUGF(args) #define SkDECLAREPARAM(type, var) #define SkPARAM(var) diff --git a/src/pathops/SkDConicLineIntersection.cpp b/src/pathops/SkDConicLineIntersection.cpp index a70307a53e..b3c120d8fb 100644 --- a/src/pathops/SkDConicLineIntersection.cpp +++ b/src/pathops/SkDConicLineIntersection.cpp @@ -79,7 +79,7 @@ public: for (int index = 0; index < count; ++index) { double conicT = roots[index]; SkDPoint pt = fConic.ptAtT(conicT); - SkDEBUGCODE_(double conicVals[] = { fConic[0].fY, fConic[1].fY, fConic[2].fY }); + SkDEBUGCODE(double conicVals[] = { fConic[0].fY, fConic[1].fY, fConic[2].fY }); SkOPOBJASSERT(fIntersections, close_to(pt.fY, axisIntercept, conicVals)); double lineT = (pt.fX - left) / (right - left); if (this->pinTs(&conicT, &lineT, &pt, kPointInitialized) @@ -157,7 +157,7 @@ public: for (int index = 0; index < count; ++index) { double conicT = roots[index]; SkDPoint pt = fConic.ptAtT(conicT); - SkDEBUGCODE_(double conicVals[] = { fConic[0].fX, fConic[1].fX, fConic[2].fX }); + SkDEBUGCODE(double conicVals[] = { fConic[0].fX, fConic[1].fX, fConic[2].fX }); SkOPOBJASSERT(fIntersections, close_to(pt.fX, axisIntercept, conicVals)); double lineT = (pt.fY - top) / (bottom - top); if (this->pinTs(&conicT, &lineT, &pt, kPointInitialized) diff --git a/src/pathops/SkPathOpsDebug.h b/src/pathops/SkPathOpsDebug.h index 9e910686b7..e7849ffbaf 100644 --- a/src/pathops/SkPathOpsDebug.h +++ b/src/pathops/SkPathOpsDebug.h @@ -101,11 +101,9 @@ #ifdef SK_RELEASE #define SkDEBUGRELEASE(a, b) b #define SkDEBUGPARAMS(...) - #define SkDEBUGCODE_(...) #else #define SkDEBUGRELEASE(a, b) a #define SkDEBUGPARAMS(...) , __VA_ARGS__ - #define SkDEBUGCODE_(...) __VA_ARGS__ // temporary until SkDEBUGCODE is fixed #endif #if DEBUG_VALIDATE == 0 diff --git a/src/pathops/SkPathOpsTSect.h b/src/pathops/SkPathOpsTSect.h index 1e483ea0ca..8a4c2a9ea7 100644 --- a/src/pathops/SkPathOpsTSect.h +++ b/src/pathops/SkPathOpsTSect.h @@ -218,7 +218,7 @@ private: SkOpDebugBool fIsLine; SkOpDebugBool fDeleted; SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState); - SkDEBUGCODE_(SkTSect* fDebugSect); + SkDEBUGCODE(SkTSect* fDebugSect); PATH_OPS_DEBUG_T_SECT_CODE(int fID); friend class SkTSect; friend class SkTSect; @@ -332,7 +332,7 @@ private: SkTSpan* fDeleted; int fActiveCount; SkDEBUGCODE(SkOpGlobalState* fDebugGlobalState); - SkDEBUGCODE_(SkTSect* fOppSect); + SkDEBUGCODE(SkTSect* fOppSect); PATH_OPS_DEBUG_T_SECT_CODE(int fID); PATH_OPS_DEBUG_T_SECT_CODE(int fDebugCount); #if DEBUG_T_SECT @@ -819,7 +819,7 @@ void SkTSpan::validateBounded() const { #if DEBUG_VALIDATE const SkTSpanBounded* testBounded = fBounded; while (testBounded) { - SkDEBUGCODE_(const SkTSpan* overlap = testBounded->fBounded); + SkDEBUGCODE(const SkTSpan* overlap = testBounded->fBounded); SkASSERT(!overlap->fDeleted); #if DEBUG_T_SECT SkASSERT(((this->debugID() ^ overlap->debugID()) & 1) == 1);