1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-29 15:14:33 +01:00

Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...'

This commit is contained in:
Rubidium
2026-01-03 11:45:18 +01:00
committed by rubidium42
parent bc842811fc
commit 2fcd4e189a
49 changed files with 162 additions and 114 deletions

View File

@@ -82,7 +82,7 @@ uint CountArticulatedParts(EngineID engine_type, bool purchase_window)
std::unique_ptr<Vehicle> v;
if (!purchase_window) {
v = std::make_unique<Vehicle>();
v = std::unique_ptr<Vehicle>(Vehicle::Create());
v->engine_type = engine_type;
v->owner = _current_company;
}
@@ -357,7 +357,7 @@ void AddArticulatedParts(Vehicle *first)
case VEH_TRAIN: {
Train *front = Train::From(first);
Train *t = new Train();
Train *t = Train::Create();
v->SetNext(t);
v = t;
@@ -381,7 +381,7 @@ void AddArticulatedParts(Vehicle *first)
case VEH_ROAD: {
RoadVehicle *front = RoadVehicle::From(first);
RoadVehicle *rv = new RoadVehicle();
RoadVehicle *rv = RoadVehicle::Create();
v->SetNext(rv);
v = rv;