| Index: src/sfnt/SkOTTableTypes.h
|
| diff --git a/src/sfnt/SkOTTableTypes.h b/src/sfnt/SkOTTableTypes.h
|
| index c978cc017911b08beefafa8699ab345c8e250839..1f49518d5915028943b6429af459bfd2752fc8af 100644
|
| --- a/src/sfnt/SkOTTableTypes.h
|
| +++ b/src/sfnt/SkOTTableTypes.h
|
| @@ -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);
|
| };
|
|
|
|
|