Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / third_party / skia / src / sfnt / SkOTTableTypes.h
index c978cc0..1f49518 100644 (file)
@@ -48,13 +48,15 @@ public:
 
 /** SkOTSetUSHORTBit<N>::value is an SK_OT_USHORT with the Nth BE bit set. */
 template <unsigned N> struct SkOTSetUSHORTBit {
-    static const uint16_t bit = SkTSetBit<N, uint16_t>::value;
+    SK_COMPILE_ASSERT(N < 16, NTooBig);
+    static const uint16_t bit = 1u << N;
     static const SK_OT_USHORT value = SkTEndian_SwapBE16(bit);
 };
 
-/** SkOTSetUSHORTBit<N>::value is an SK_OT_ULONG with the Nth BE bit set. */
+/** SkOTSetULONGBit<N>::value is an SK_OT_ULONG with the Nth BE bit set. */
 template <unsigned N> struct SkOTSetULONGBit {
-    static const uint32_t bit = SkTSetBit<N, uint32_t>::value;
+    SK_COMPILE_ASSERT(N < 32, NTooBig);
+    static const uint32_t bit = 1u << N;
     static const SK_OT_ULONG value = SkTEndian_SwapBE32(bit);
 };