Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Replace the one use of CompileTimeAssert with static_assert (already …
…used elsewhere).
  • Loading branch information
comex committed Sep 12, 2013
1 parent 9ee50a2 commit b9c1af0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
3 changes: 0 additions & 3 deletions Source/Core/Common/Src/CommonFuncs.h
Expand Up @@ -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) )
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/Core/Src/HW/DSPHLE/UCodes/UCode_Zelda_Voice.cpp
Expand Up @@ -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++)
Expand Down

0 comments on commit b9c1af0

Please sign in to comment.