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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user