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

@@ -1259,7 +1259,7 @@ void PrepareUnload(Vehicle *front_v)
* limit in number of CargoPayments. Can't go wrong. */
static_assert(CargoPaymentPool::MAX_SIZE == VehiclePool::MAX_SIZE);
assert(CargoPayment::CanAllocateItem());
front_v->cargo_payment = new CargoPayment(front_v);
front_v->cargo_payment = CargoPayment::Create(front_v);
std::vector<StationID> next_station;
front_v->GetNextStoppingStation(next_station);