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>
diff --git a/tests/PathOpsCubicLineIntersectionTest.cpp b/tests/PathOpsCubicLineIntersectionTest.cpp
index a6ae5e6..87e6cea 100644
--- a/tests/PathOpsCubicLineIntersectionTest.cpp
+++ b/tests/PathOpsCubicLineIntersectionTest.cpp
@@ -11,6 +11,8 @@
#include "SkReduceOrder.h"
#include "Test.h"
+#include <utility>
+
struct lineCubic {
CubicPts cubic;
SkDLine line;
@@ -106,7 +108,8 @@
double bottom = line[1].fY;
flipped = top > bottom;
if (flipped) {
- SkTSwap<double>(top, bottom);
+ using std::swap;
+ swap(top, bottom);
}
result = intersections.vertical(cubic, top, bottom, line[0].fX, flipped);
} else if (line[0].fY == line[1].fY) {
@@ -114,7 +117,8 @@
double right = line[1].fX;
flipped = left > right;
if (flipped) {
- SkTSwap<double>(left, right);
+ using std::swap;
+ swap(left, right);
}
result = intersections.horizontal(cubic, left, right, line[0].fY, flipped);
} else {