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

@@ -2253,7 +2253,7 @@ std::tuple<CommandCost, Money, TownID> CmdFoundTown(DoCommandFlags flags, TileIn
if (random_location) {
t = CreateRandomTown(20, townnameparts, size, city, layout);
} else {
t = new Town(tile);
t = Town::Create(tile);
DoCreateTown(t, tile, townnameparts, size, city, layout, true);
}
@@ -2401,7 +2401,7 @@ static Town *CreateRandomTown(uint attempts, uint32_t townnameparts, TownSize si
} else if (TownCanBePlacedHere(tile, true).Failed()) continue;
/* Allocate a town struct */
Town *t = new Town(tile);
Town *t = Town::Create(tile);
DoCreateTown(t, tile, townnameparts, size, city, layout, false);