1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-22 03:42:41 +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

@@ -275,8 +275,8 @@ CommandCost CmdBuildAircraft(DoCommandFlags flags, TileIndex tile, const Engine
tile = st->airport.GetHangarTile(st->airport.GetHangarNum(tile));
if (flags.Test(DoCommandFlag::Execute)) {
Aircraft *v = new Aircraft(); // aircraft
Aircraft *u = new Aircraft(); // shadow
Aircraft *v = Aircraft::Create(); // aircraft
Aircraft *u = Aircraft::Create(); // shadow
*ret = v;
v->direction = DIR_SE;
@@ -366,7 +366,7 @@ CommandCost CmdBuildAircraft(DoCommandFlags flags, TileIndex tile, const Engine
/* Aircraft with 3 vehicles (chopper)? */
if (v->subtype == AIR_HELICOPTER) {
Aircraft *w = new Aircraft();
Aircraft *w = Aircraft::Create();
w->engine_type = e->index;
w->direction = DIR_N;
w->owner = _current_company;