diff --git a/experimental/Intersection/EdgeWalker.cpp b/experimental/Intersection/EdgeWalker.cpp index 8baf72794..e74689fb4 100644 --- a/experimental/Intersection/EdgeWalker.cpp +++ b/experimental/Intersection/EdgeWalker.cpp @@ -2292,7 +2292,7 @@ static SkScalar adjustCoincident(SkTDArray& edgeList, ActiveEdge* activePtr, * nextPtr = edgeList[0]; size_t index; bool foundCoincident = false; - int firstIndex = 0; + size_t firstIndex = 0; for (index = 1; index < edgeCount; ++index) { activePtr = nextPtr; nextPtr = edgeList[index]; diff --git a/experimental/Intersection/QuadraticIntersection_Test.cpp b/experimental/Intersection/QuadraticIntersection_Test.cpp index 7c573d487..adf91bde8 100644 --- a/experimental/Intersection/QuadraticIntersection_Test.cpp +++ b/experimental/Intersection/QuadraticIntersection_Test.cpp @@ -54,8 +54,8 @@ static const Quadratic testSet[] = { const size_t testSetCount = sizeof(testSet) / sizeof(testSet[0]); static void oneOffTest() { - for (int outer = 0; outer < testSetCount - 1; ++outer) { - for (int inner = outer + 1; inner < testSetCount; ++inner) { + for (size_t outer = 0; outer < testSetCount - 1; ++outer) { + for (size_t inner = outer + 1; inner < testSetCount; ++inner) { const Quadratic& quad1 = testSet[outer]; const Quadratic& quad2 = testSet[inner]; Intersections intersections; diff --git a/experimental/Intersection/QuadraticReduceOrder_Test.cpp b/experimental/Intersection/QuadraticReduceOrder_Test.cpp index b716cdb1a..881289a67 100644 --- a/experimental/Intersection/QuadraticReduceOrder_Test.cpp +++ b/experimental/Intersection/QuadraticReduceOrder_Test.cpp @@ -14,7 +14,7 @@ static const size_t testSetCount = sizeof(testSet) / sizeof(testSet[0]); static void oneOffTest() { SkDebugf("%s FLT_EPSILON=%1.9g\n", __FUNCTION__, FLT_EPSILON); - for (int index = 0; index < testSetCount; ++index) { + for (size_t index = 0; index < testSetCount; ++index) { const Quadratic& quad = testSet[index]; Quadratic reduce; int order = reduceOrder(quad, reduce); diff --git a/experimental/Intersection/Simplify.cpp b/experimental/Intersection/Simplify.cpp index 7826c09ec..f3c095e26 100644 --- a/experimental/Intersection/Simplify.cpp +++ b/experimental/Intersection/Simplify.cpp @@ -2145,7 +2145,7 @@ static bool addIntersectTs(Contour* test, Contour* next) { // see if coincidence is formed by clipping non-concident segments static void coincidenceCheck(SkTDArray& contourList, int winding) { int contourCount = contourList.count(); - for (size_t cIndex = 0; cIndex < contourCount; ++cIndex) { + for (int cIndex = 0; cIndex < contourCount; ++cIndex) { Contour* contour = contourList[cIndex]; contour->findTooCloseToCall(winding); } diff --git a/experimental/Intersection/SimplifyAddIntersectingTs_Test.cpp b/experimental/Intersection/SimplifyAddIntersectingTs_Test.cpp index 11b6c0130..da2569c5e 100644 --- a/experimental/Intersection/SimplifyAddIntersectingTs_Test.cpp +++ b/experimental/Intersection/SimplifyAddIntersectingTs_Test.cpp @@ -49,7 +49,7 @@ static const SkPoint cubics[][4] = { static const size_t cubicCount = sizeof(cubics) / sizeof(cubics[0]); static const size_t testCount = lineCount + quadCount + cubicCount; -static SkPath::Verb setPath(int outer, SkPath& path, const SkPoint*& pts1) { +static SkPath::Verb setPath(size_t outer, SkPath& path, const SkPoint*& pts1) { SkPath::Verb c1Type; if (outer < lineCount) { path.moveTo(lines[outer][0].fX, lines[outer][0].fY); @@ -105,8 +105,8 @@ static void testPath(const SkPath& path, const SkPoint* pts1, SkPath::Verb c1Typ #endif } -static const int firstO = 6; -static const int firstI = 1; +static const size_t firstO = 6; +static const size_t firstI = 1; void SimplifyAddIntersectingTs_Test() { const SkPoint* pts1, * pts2; @@ -117,10 +117,10 @@ void SimplifyAddIntersectingTs_Test() { SkPath::Verb c2Type = setPath(firstI, path2, pts2); testPath(path2, pts1, c1Type, pts2, c2Type); } - for (int o = 0; o < testCount; ++o) { + for (size_t o = 0; o < testCount; ++o) { SkPath path; SkPath::Verb c1Type = setPath(o, path, pts1); - for (int i = 0; i < testCount; ++i) { + for (size_t i = 0; i < testCount; ++i) { SkPath path2(path); SkPath::Verb c2Type = setPath(i, path2, pts2); testPath(path2, pts1, c1Type, pts2, c2Type); diff --git a/experimental/Intersection/SimplifyAngle_Test.cpp b/experimental/Intersection/SimplifyAngle_Test.cpp index aa291c00c..739158829 100644 --- a/experimental/Intersection/SimplifyAngle_Test.cpp +++ b/experimental/Intersection/SimplifyAngle_Test.cpp @@ -125,7 +125,7 @@ static void testQuads(bool testFlat) { *angleList[x] < *angleList[x + 1]; SkASSERT(x == quadCount - 1 || *angleList[x] < *angleList[x + 1]); const SimplifyAngleTest::Angle* angle = angleList[x]; - if (x != angle->start()) { + if ((int) x != angle->start()) { SkDebugf("%s [%d] [%d]\n", __FUNCTION__, x, angle->start()); SkASSERT(0); } @@ -147,7 +147,7 @@ static void testCubics(bool testFlat) { QSort(angleList.begin(), angleList.end() - 1); for (size_t x = 0; x < cubicCount; ++x) { const SimplifyAngleTest::Angle* angle = angleList[x]; - if (x != angle->start()) { + if ((int) x != angle->start()) { SkDebugf("%s [%d] [%d]\n", __FUNCTION__, x, angle->start()); SkASSERT(0); }