Skip to content

Commit

Permalink
Switched to using '_Static_assert'.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeller committed Aug 19, 2018
1 parent 70ac942 commit 37568a7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/main/common/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,7 @@
#define UNUSED(x) (void)(x)
#endif

#define STATIC_ASSERT(condition, name) \
enum { assert_failed_ ## name = sizeof(char [(condition) ? 1 : -1 ]) }
// If it is decided to ditch the -Wpedantic build flag, this should be switched to:
// _Static_assert((condition), #name)
#define STATIC_ASSERT(condition, name) _Static_assert((condition), #name)


#define BIT(x) (1 << (x))
Expand Down

0 comments on commit 37568a7

Please sign in to comment.