Codechange: do not use MallocT for the pool

Needed to make the placement new operator use Tindex over size_t because of
ambiguity for the delete operator variant that also has the size.
This commit is contained in:
Rubidium
2025-02-20 18:59:28 +01:00
committed by rubidium42
parent 426b03b31a
commit 09716dba75
24 changed files with 80 additions and 96 deletions

View File

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