1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-26 05:34:12 +01:00

Codechange: replace 'new (index) PoolItem(...' with 'PoolItem::CreateAtIndex(index, ...'

This commit is contained in:
Rubidium
2026-01-03 12:10:20 +01:00
committed by rubidium42
parent 2fcd4e189a
commit ee9e8ab9b2
25 changed files with 95 additions and 67 deletions

View File

@@ -608,7 +608,7 @@ Company *DoStartupNewCompany(bool is_ai, CompanyID company = CompanyID::Invalid(
c = Company::Create(STR_SV_UNNAMED, is_ai);
} else {
if (Company::IsValidID(company)) return nullptr;
c = new (company) Company(STR_SV_UNNAMED, is_ai);
c = Company::CreateAtIndex(company, STR_SV_UNNAMED, is_ai);
}
c->colour = colour;