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
@@ -953,9 +953,7 @@ void CallVehicleTicks()
|
||||
PerformanceAccumulator::Reset(PFE_GL_AIRCRAFT);
|
||||
|
||||
for (Vehicle *v : Vehicle::Iterate()) {
|
||||
#ifdef WITH_ASSERT
|
||||
size_t vehicle_index = v->index;
|
||||
#endif
|
||||
[[maybe_unused]] size_t vehicle_index = v->index;
|
||||
|
||||
/* Vehicle could be deleted in this tick */
|
||||
if (!v->Tick()) {
|
||||
|
Reference in New Issue
Block a user