aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkTypes.h
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-06-11 21:44:01 -0400
committerGravatar Mike Klein <mtklein@google.com>2018-06-12 15:03:21 +0000
commit2a2f67592602b18527bc3fd449132d420cd5b62e (patch)
tree0f6078db2af3b904f08e8cc0118055bf1db621a5 /include/core/SkTypes.h
parent7c525e62d405d57ae7a7742cf607b9770a83a0ab (diff)
SkTypes: extract SkTo
Change-Id: I8de790d5013db2105ad885fa2683303d7c250b09 Reviewed-on: https://skia-review.googlesource.com/133620 Reviewed-by: Mike Klein <mtklein@google.com>
Diffstat (limited to 'include/core/SkTypes.h')
-rw-r--r--include/core/SkTypes.h15
1 files changed, 0 insertions, 15 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 7945e12426..a4dcc3cc37 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -149,21 +149,6 @@ typedef unsigned U16CPU;
*/
typedef uint8_t SkBool8;
-#include "../private/SkTFitsIn.h"
-template <typename D, typename S> constexpr D SkTo(S s) {
- return SkASSERT(SkTFitsIn<D>(s)),
- static_cast<D>(s);
-}
-#define SkToS8(x) SkTo<int8_t>(x)
-#define SkToU8(x) SkTo<uint8_t>(x)
-#define SkToS16(x) SkTo<int16_t>(x)
-#define SkToU16(x) SkTo<uint16_t>(x)
-#define SkToS32(x) SkTo<int32_t>(x)
-#define SkToU32(x) SkTo<uint32_t>(x)
-#define SkToInt(x) SkTo<int>(x)
-#define SkToUInt(x) SkTo<unsigned>(x)
-#define SkToSizeT(x) SkTo<size_t>(x)
-
/** Returns 0 or 1 based on the condition
*/
#define SkToBool(cond) ((cond) != 0)