summaryrefslogtreecommitdiff
path: root/src/pathfinder
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-06-03 16:55:08 +0200
committerPatric Stout <github@truebrain.nl>2021-06-03 17:30:00 +0200
commit28e90769f74e55ea7c8f75146d5b33e0aa777da8 (patch)
treeeeff0974346ef9da7cbc2b33b040d016c341ff0b /src/pathfinder
parentf8dd5dd00a7aa3cc5769b4bce0a1b7a63073c8ce (diff)
downloadopenttd-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/pathfinder')
-rw-r--r--src/pathfinder/npf/npf.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pathfinder/npf/npf.cpp b/src/pathfinder/npf/npf.cpp
index 009452161..604ead52b 100644
--- a/src/pathfinder/npf/npf.cpp
+++ b/src/pathfinder/npf/npf.cpp
@@ -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) {