diff options
author | Ben Wagner <bungeman@google.com> | 2018-06-18 15:11:00 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-19 02:06:31 +0000 |
commit | f08d1d0ce19c72bb911f059dcf916cf99a0a2467 (patch) | |
tree | 65fed059b8bd2b730c86e202cc8475fb60b76455 /tests/PathOpsConicLineIntersectionTest.cpp | |
parent | 93724202640b1f5ae9ccf7646151c9c3bb5afa5c (diff) |
Stop using SkTSwap.
Use std::swap instead. It does not appear that any external user
specializes SkTSwap, but some may still use it. This removes all use in
Skia so that SkTSwap can later be removed in a smaller CL. After that
the <utility> include can be removed from SkTypes.h.
Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753
Reviewed-on: https://skia-review.googlesource.com/135578
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'tests/PathOpsConicLineIntersectionTest.cpp')
-rw-r--r-- | tests/PathOpsConicLineIntersectionTest.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/PathOpsConicLineIntersectionTest.cpp b/tests/PathOpsConicLineIntersectionTest.cpp index c3d4a2afe3..8a96519815 100644 --- a/tests/PathOpsConicLineIntersectionTest.cpp +++ b/tests/PathOpsConicLineIntersectionTest.cpp @@ -13,6 +13,8 @@ #include "SkReduceOrder.h" #include "Test.h" +#include <utility> + static struct lineConic { ConicPts conic; SkDLine line; @@ -38,7 +40,8 @@ static int doIntersect(SkIntersections& intersections, const SkDConic& conic, co double bottom = line[1].fY; flipped = top > bottom; if (flipped) { - SkTSwap<double>(top, bottom); + using std::swap; + swap(top, bottom); } result = intersections.vertical(conic, top, bottom, line[0].fX, flipped); } else if (line[0].fY == line[1].fY) { @@ -46,7 +49,8 @@ static int doIntersect(SkIntersections& intersections, const SkDConic& conic, co double right = line[1].fX; flipped = left > right; if (flipped) { - SkTSwap<double>(left, right); + using std::swap; + swap(left, right); } result = intersections.horizontal(conic, left, right, line[0].fY, flipped); } else { |