Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this is always set if assert() is valid. No matter if NDEBUG is set or not.
This commit is contained in:
committed by
Patric Stout
parent
f8dd5dd00a
commit
28e90769f7
@@ -101,8 +101,7 @@ static void LoadGrfFileIndexed(const char *filename, const SpriteID *index_tbl,
|
||||
uint end = *index_tbl++;
|
||||
|
||||
do {
|
||||
bool b = LoadNextSprite(start, file, sprite_id);
|
||||
(void)b; // Unused without asserts
|
||||
[[maybe_unused]] bool b = LoadNextSprite(start, file, sprite_id);
|
||||
assert(b);
|
||||
sprite_id++;
|
||||
} while (++start <= end);
|
||||
|
||||
Reference in New Issue
Block a user