1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-30 23:54:35 +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

@@ -96,7 +96,7 @@ CargoPacket *CargoPacket::Split(uint new_size)
if (!CargoPacket::CanAllocateItem()) return nullptr;
Money fs = this->GetFeederShare(new_size);
CargoPacket *cp_new = new CargoPacket(new_size, fs, *this);
CargoPacket *cp_new = CargoPacket::Create(new_size, fs, *this);
this->feeder_share -= fs;
this->count -= new_size;
return cp_new;