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
@@ -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];
|
||||
|
Reference in New Issue
Block a user