Codechange: Replace assert_compile macro with static_assert

This commit is contained in:
Charles Pigott
2020-12-27 10:44:22 +00:00
parent 395a5d9991
commit 860c270c73
77 changed files with 133 additions and 135 deletions

View File

@@ -618,9 +618,9 @@ void DupSprite(SpriteID old_spr, SpriteID new_spr)
static const size_t S_FREE_MASK = sizeof(size_t) - 1;
/* to make sure nobody adds things to MemBlock without checking S_FREE_MASK first */
assert_compile(sizeof(MemBlock) == sizeof(size_t));
static_assert(sizeof(MemBlock) == sizeof(size_t));
/* make sure it's a power of two */
assert_compile((sizeof(size_t) & (sizeof(size_t) - 1)) == 0);
static_assert((sizeof(size_t) & (sizeof(size_t) - 1)) == 0);
static inline MemBlock *NextBlock(MemBlock *block)
{