summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorPatric Stout <truebrain@openttd.org>2021-04-01 11:16:19 +0200
committerGitHub <noreply@github.com>2021-04-01 11:16:19 +0200
commitfece1c57cab1d148e15775f3e10ba474dcfc1360 (patch)
tree864829048f995a13c2ada0a6f731404a7de0bab7 /src/engine.cpp
parent9eb6c78a0245317f8dc68ad1034b66019e1bf14f (diff)
downloadopenttd-fece1c57cab1d148e15775f3e10ba474dcfc1360.tar.xz
Codechange: Suppress warnings when asserts are disabled (#8917)
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index a72de454b..596e87063 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -549,6 +549,7 @@ void SetupEngines()
* in any case, and we just cleaned the pool. */
assert(Engine::CanAllocateItem());
const Engine *e = new Engine(eid.type, eid.internal_id);
+ (void)e; // assert only
assert(e->index == index);
index++;
}
@@ -1003,8 +1004,7 @@ static void NewVehicleAvailable(Engine *e)
if (e->type == VEH_TRAIN) {
/* maybe make another rail type available */
- RailType railtype = e->u.rail.railtype;
- assert(railtype < RAILTYPE_END);
+ assert(e->u.rail.railtype < RAILTYPE_END);
for (Company *c : Company::Iterate()) c->avail_railtypes = AddDateIntroducedRailTypes(c->avail_railtypes | GetRailTypeInfo(e->u.rail.railtype)->introduces_railtypes, _date);
} else if (e->type == VEH_ROAD) {
/* maybe make another road type available */