From ceeaa78713dde9cc6e3ccd688aca6021b260af4d Mon Sep 17 00:00:00 2001 From: csmartdalton Date: Wed, 10 Aug 2016 10:07:57 -0700 Subject: Fix SkDEBUGCODE to accept commas BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2231663002 Review-Url: https://codereview.chromium.org/2231663002 --- src/pathops/SkDConicLineIntersection.cpp | 4 ++-- src/pathops/SkPathOpsDebug.h | 2 -- src/pathops/SkPathOpsTSect.h | 6 +++--- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src') 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); -- cgit v1.2.3