Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Unified Diff: include/core/SkTemplates.h

Issue 219023011: Fold SkTSetBit into SkOTSet*Bit. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add back asserts Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/sfnt/SkOTTableTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTemplates.h
diff --git a/include/core/SkTemplates.h b/include/core/SkTemplates.h
index 4bcaf3f7b3bd7bd44956f487509e2b1967af864a..a6248f547f38f8008454dca6160e7a5db9f5438f 100644
--- a/include/core/SkTemplates.h
+++ b/include/core/SkTemplates.h
@@ -11,7 +11,6 @@
#define SkTemplates_DEFINED
#include "SkTypes.h"
-#include <limits>
#include <limits.h>
#include <new>
@@ -66,15 +65,6 @@ template <typename D, typename S> static D* SkTAddOffset(S* ptr, size_t byteOffs
);
}
-/** SkTSetBit<N, T>::value is a T with the Nth bit set. */
-template<unsigned N, typename T = uintmax_t> struct SkTSetBit {
- static const T value = static_cast<T>(1) << N;
- SK_COMPILE_ASSERT(sizeof(T)*CHAR_BIT > N, SkTSetBit_N_too_large);
- SK_COMPILE_ASSERT(std::numeric_limits<T>::is_integer, SkTSetBit_T_must_be_integer);
- SK_COMPILE_ASSERT(!std::numeric_limits<T>::is_signed, SkTSetBit_T_must_be_unsigned);
- SK_COMPILE_ASSERT(std::numeric_limits<T>::radix == 2, SkTSetBit_T_radix_must_be_2);
-};
-
/** \class SkAutoTCallVProc
Call a function when this goes out of scope. The template uses two
« no previous file with comments | « no previous file | src/sfnt/SkOTTableTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698