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
@@ -1045,8 +1045,7 @@ static NPFFoundTargetData NPFRouteInternal(AyStarNode *start1, bool ignore_start
|
||||
_npf_aystar.user_data = user;
|
||||
|
||||
/* GO! */
|
||||
int r = _npf_aystar.Main();
|
||||
(void)r; // assert only
|
||||
[[maybe_unused]] int r = _npf_aystar.Main();
|
||||
assert(r != AYSTAR_STILL_BUSY);
|
||||
|
||||
if (result.best_bird_dist != 0) {
|
||||
|
Reference in New Issue
Block a user