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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user