summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-12-15 00:22:04 +0100
committerMichael Lutz <michi@icosahedron.de>2020-12-15 00:29:30 +0100
commit79240eab1ee4abb2882a40c7ac18e4915b4dc820 (patch)
tree98abb3c8ccf490efa459ed29fe7f28699c8d9928 /src/engine.cpp
parentcc1679e3171bf6982164c4072a773fdd687ea885 (diff)
downloadopenttd-79240eab1ee4abb2882a40c7ac18e4915b4dc820.tar.xz
Codechange: Make use of the improved C++17 emplace_back function.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 41849b8a2..311a936ed 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -486,8 +486,7 @@ void EngineOverrideManager::ResetToDefaultMapping()
this->clear();
for (VehicleType type = VEH_TRAIN; type <= VEH_AIRCRAFT; type++) {
for (uint internal_id = 0; internal_id < _engine_counts[type]; internal_id++) {
- /*C++17: EngineIDMapping &eid = */ this->emplace_back();
- EngineIDMapping &eid = this->back();
+ EngineIDMapping &eid = this->emplace_back();
eid.type = type;
eid.grfid = INVALID_GRFID;
eid.internal_id = internal_id;