aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Hal Canary <halcanary@google.com>2018-06-12 16:47:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-12 21:37:54 +0000
commitbb9ee9b4aa7d80e8a85832a462a3123060d4bd64 (patch)
tree98d82cd8fab86562efddd7dd98e5031142da8a18 /include
parentcee46e5e99d52a162ec19d7567aeb39083b75ec4 (diff)
SkTypes: add static back
Change-Id: I0791181914c2f52ea97321bc17855f8b212c33d1 Reviewed-on: https://skia-review.googlesource.com/134422 Reviewed-by: Mike Klein <mtklein@google.com> Auto-Submit: Hal Canary <halcanary@google.com> Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/core/SkTypes.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index 9e557ef3e7..ba747ef2f1 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -119,11 +119,11 @@ typedef unsigned U16CPU;
static constexpr int64_t SK_MaxS64 = 0x7FFFFFFFFFFFFFFF;
static constexpr int64_t SK_MinS64 = -SK_MaxS64;
-inline constexpr int32_t SkLeftShift(int32_t value, int32_t shift) {
+static inline constexpr int32_t SkLeftShift(int32_t value, int32_t shift) {
return (int32_t) ((uint32_t) value << shift);
}
-inline constexpr int64_t SkLeftShift(int64_t value, int32_t shift) {
+static inline constexpr int64_t SkLeftShift(int64_t value, int32_t shift) {
return (int64_t) ((uint64_t) value << shift);
}
@@ -135,23 +135,23 @@ template <typename T, size_t N> char (&SkArrayCountHelper(T (&array)[N]))[N];
////////////////////////////////////////////////////////////////////////////////
-template <typename T> inline constexpr T SkAlign2(T x) { return (x + 1) >> 1 << 1; }
-template <typename T> inline constexpr T SkAlign4(T x) { return (x + 3) >> 2 << 2; }
-template <typename T> inline constexpr T SkAlign8(T x) { return (x + 7) >> 3 << 3; }
+template <typename T> static constexpr T SkAlign2(T x) { return (x + 1) >> 1 << 1; }
+template <typename T> static constexpr T SkAlign4(T x) { return (x + 3) >> 2 << 2; }
+template <typename T> static constexpr T SkAlign8(T x) { return (x + 7) >> 3 << 3; }
-template <typename T> inline constexpr bool SkIsAlign2(T x) { return 0 == (x & 1); }
-template <typename T> inline constexpr bool SkIsAlign4(T x) { return 0 == (x & 3); }
-template <typename T> inline constexpr bool SkIsAlign8(T x) { return 0 == (x & 7); }
+template <typename T> static constexpr bool SkIsAlign2(T x) { return 0 == (x & 1); }
+template <typename T> static constexpr bool SkIsAlign4(T x) { return 0 == (x & 3); }
+template <typename T> static constexpr bool SkIsAlign8(T x) { return 0 == (x & 7); }
-template <typename T> inline constexpr T SkAlignPtr(T x) {
+template <typename T> static constexpr T SkAlignPtr(T x) {
return sizeof(void*) == 8 ? SkAlign8(x) : SkAlign4(x);
}
-template <typename T> inline constexpr bool SkIsAlignPtr(T x) {
+template <typename T> static constexpr bool SkIsAlignPtr(T x) {
return sizeof(void*) == 8 ? SkIsAlign8(x) : SkIsAlign4(x);
}
typedef uint32_t SkFourByteTag;
-inline constexpr SkFourByteTag SkSetFourByteTag(char a, char b, char c, char d) {
+static inline constexpr SkFourByteTag SkSetFourByteTag(char a, char b, char c, char d) {
return (((uint8_t)a << 24) | ((uint8_t)b << 16) | ((uint8_t)c << 8) | (uint8_t)d);
}