diff options
author | 2018-06-18 15:11:00 -0400 | |
---|---|---|
committer | 2018-06-19 02:06:31 +0000 | |
commit | f08d1d0ce19c72bb911f059dcf916cf99a0a2467 (patch) | |
tree | 65fed059b8bd2b730c86e202cc8475fb60b76455 /src/core/SkMatrix.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 'src/core/SkMatrix.cpp')
-rw-r--r-- | src/core/SkMatrix.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/core/SkMatrix.cpp b/src/core/SkMatrix.cpp index cb4b792a6b..3d50659e08 100644 --- a/src/core/SkMatrix.cpp +++ b/src/core/SkMatrix.cpp @@ -16,7 +16,9 @@ #include "SkRSXform.h" #include "SkString.h" #include "SkTo.h" -#include <stddef.h> + +#include <cstddef> +#include <utility> static void normalize_perspective(SkScalar mat[9]) { // If it was interesting to never store the last element, we could divide all 8 other @@ -1488,7 +1490,8 @@ template <MinMaxOrBoth MIN_MAX_OR_BOTH> bool get_scale_factor(SkMatrix::TypeMask results[0] = SkScalarAbs(m[SkMatrix::kMScaleX]); results[1] = SkScalarAbs(m[SkMatrix::kMScaleY]); if (results[0] > results[1]) { - SkTSwap(results[0], results[1]); + using std::swap; + swap(results[0], results[1]); } } return true; @@ -1518,7 +1521,8 @@ template <MinMaxOrBoth MIN_MAX_OR_BOTH> bool get_scale_factor(SkMatrix::TypeMask results[0] = a; results[1] = c; if (results[0] > results[1]) { - SkTSwap(results[0], results[1]); + using std::swap; + swap(results[0], results[1]); } } } else { |