Replace the one use of CompileTimeAssert with static_assert (already used elsewhere).
This commit is contained in:
parent
9ee50a2730
commit
b9c1af04ad
|
@ -24,9 +24,6 @@ struct ArraySizeImpl<T[N], 0> { static const std::size_t size = N; };
|
|||
// Will fail to compile on a non-array:
|
||||
#define ArraySize(x) ArraySizeImpl<decltype(x)>::size
|
||||
|
||||
template <bool> struct CompileTimeAssert;
|
||||
template<> struct CompileTimeAssert<true> {};
|
||||
|
||||
#define b2(x) ( (x) | ( (x) >> 1) )
|
||||
#define b4(x) ( b2(x) | ( b2(x) >> 2) )
|
||||
#define b8(x) ( b4(x) | ( b4(x) >> 4) )
|
||||
|
|
|
@ -219,8 +219,7 @@ void PrintObject(const T &Obj)
|
|||
|
||||
// If this miscompiles, adjust the size of
|
||||
// ZeldaVoicePB to 0x180 bytes (0xc0 shorts).
|
||||
CompileTimeAssert<sizeof(ZeldaVoicePB) == 0x180> ensure_zpb_size_correct;
|
||||
(void)ensure_zpb_size_correct;
|
||||
static_assert(sizeof(ZeldaVoicePB) == 0x180, "ZeldaVoicePB incorrectly defined.");
|
||||
|
||||
ss << std::hex;
|
||||
for (size_t i = 0; i < sizeof(T); i++)
|
||||
|
|
Loading…
Reference in New Issue