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/tgp.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/tgp.cpp')
-rw-r--r-- | src/tgp.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tgp.cpp b/src/tgp.cpp index e23b2643d..2c0c47910 100644 --- a/src/tgp.cpp +++ b/src/tgp.cpp @@ -658,9 +658,7 @@ static void HeightMapCurves(uint level) for (uint t = 0; t < lengthof(curve_maps); t++) { if (!HasBit(corner_bits, t)) continue; -#ifdef WITH_ASSERT - bool found = false; -#endif + [[maybe_unused]] bool found = false; const control_point_t *cm = curve_maps[t].list; for (uint i = 0; i < curve_maps[t].length - 1; i++) { const control_point_t &p1 = cm[i]; |