From 28e90769f74e55ea7c8f75146d5b33e0aa777da8 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Thu, 3 Jun 2021 16:55:08 +0200 Subject: 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. --- src/pathfinder/npf/npf.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/pathfinder/npf/npf.cpp') 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) { -- cgit v1.2.3-70-g09d2