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

@@ -1681,7 +1681,7 @@ void UpdateCursorSize()
/* Ignore setting any cursor before the sprites are loaded. */
if (GetMaxSpriteID() == 0) return;
assert_compile(lengthof(_cursor.sprite_seq) == lengthof(_cursor.sprite_pos));
static_assert(lengthof(_cursor.sprite_seq) == lengthof(_cursor.sprite_pos));
assert(_cursor.sprite_count <= lengthof(_cursor.sprite_seq));
for (uint i = 0; i < _cursor.sprite_count; ++i) {
const Sprite *p = GetSprite(GB(_cursor.sprite_seq[i].sprite, 0, SPRITE_WIDTH), ST_NORMAL);