1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-25 05:04:07 +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

@@ -448,7 +448,7 @@ static uint32_t GetCountAndDistanceOfClosestInstance(const ResolverObject &objec
/* Create storage on first modification. */
const IndustrySpec *indsp = GetIndustrySpec(this->industry->type);
assert(PersistentStorage::CanAllocateItem());
this->industry->psa = new PersistentStorage(indsp->grf_prop.grfid, GSF_INDUSTRIES, this->industry->location.tile);
this->industry->psa = PersistentStorage::Create(indsp->grf_prop.grfid, GSF_INDUSTRIES, this->industry->location.tile);
}
this->industry->psa->StoreValue(pos, value);