summaryrefslogtreecommitdiff
path: root/src/engine.cpp
diff options
context:
space:
mode:
authorPeterN <peter1138@openttd.org>2021-04-30 12:03:07 +0100
committerGitHub <noreply@github.com>2021-04-30 12:03:07 +0100
commit3dbd6475fec5ebd63b18004bb94048460c4fb4a3 (patch)
tree2b9d79e0aeb4839526b30d4bc171e1715608e3f6 /src/engine.cpp
parent665a3928e2f07e6ee1faed1c8b08fe3a68fbc37a (diff)
downloadopenttd-3dbd6475fec5ebd63b18004bb94048460c4fb4a3.tar.xz
Codechange: Use C++ features for train wagon overrides. (#9141)
This removes the need for C-style array management and allows use of iterators to perform wagon override lookups.
Diffstat (limited to 'src/engine.cpp')
-rw-r--r--src/engine.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/engine.cpp b/src/engine.cpp
index 60b0d4222..41cd9dba8 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -66,12 +66,6 @@ static_assert(lengthof(_orig_rail_vehicle_info) + lengthof(_orig_road_vehicle_in
const uint EngineOverrideManager::NUM_DEFAULT_ENGINES = _engine_counts[VEH_TRAIN] + _engine_counts[VEH_ROAD] + _engine_counts[VEH_SHIP] + _engine_counts[VEH_AIRCRAFT];
-Engine::Engine() :
- overrides_count(0),
- overrides(nullptr)
-{
-}
-
Engine::Engine(VehicleType type, EngineID base)
{
this->type = type;
@@ -136,11 +130,6 @@ Engine::Engine(VehicleType type, EngineID base)
}
}
-Engine::~Engine()
-{
- UnloadWagonOverrides(this);
-}
-
/**
* Checks whether the engine is a valid (non-articulated part of an) engine.
* @return true if enabled