diff options
author | Patric Stout <truebrain@openttd.org> | 2021-06-03 16:55:08 +0200 |
---|---|---|
committer | Patric Stout <github@truebrain.nl> | 2021-06-03 17:30:00 +0200 |
commit | 28e90769f74e55ea7c8f75146d5b33e0aa777da8 (patch) | |
tree | eeff0974346ef9da7cbc2b33b040d016c341ff0b /src/gfxinit.cpp | |
parent | f8dd5dd00a7aa3cc5769b4bce0a1b7a63073c8ce (diff) | |
download | openttd-28e90769f74e55ea7c8f75146d5b33e0aa777da8.tar.xz |
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.
Diffstat (limited to 'src/gfxinit.cpp')
-rw-r--r-- | src/gfxinit.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gfxinit.cpp b/src/gfxinit.cpp index 713f6e543..8816c8db3 100644 --- a/src/gfxinit.cpp +++ b/src/gfxinit.cpp @@ -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); |