diff options
-rwxr-xr-x | src/utils/SkInsetConvexPolygon.cpp | 3 | ||||
-rw-r--r-- | tests/InsetConvexPolyTest.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/utils/SkInsetConvexPolygon.cpp b/src/utils/SkInsetConvexPolygon.cpp index e4b5249cef..93bbae9b9a 100755 --- a/src/utils/SkInsetConvexPolygon.cpp +++ b/src/utils/SkInsetConvexPolygon.cpp @@ -125,8 +125,7 @@ static bool is_convex(const SkTDArray<SkPoint>& poly) { SkVector v0 = poly[j] - poly[i]; SkVector v1 = poly[k] - poly[i]; SkScalar perpDot = v0.cross(v1); - int side = winding*perpDot; - if (side < 0) { + if (winding*perpDot < 0) { return false; } } diff --git a/tests/InsetConvexPolyTest.cpp b/tests/InsetConvexPolyTest.cpp index e13a25a70f..5376789943 100644 --- a/tests/InsetConvexPolyTest.cpp +++ b/tests/InsetConvexPolyTest.cpp @@ -23,8 +23,7 @@ static bool is_convex(const SkTDArray<SkPoint>& poly) { SkVector v0 = poly[j] - poly[i]; SkVector v1 = poly[k] - poly[i]; SkScalar perpDot = v0.cross(v1); - int side = winding*perpDot; - if (side < 0) { + if (winding*perpDot < 0) { return false; } } |