Codechange: replace 'new PoolItem(...' with 'PoolItem::Create(...'

This commit is contained in:
Rubidium
2026-01-03 16:04:32 +01:00
committed by rubidium42
parent bc842811fc
commit 2fcd4e189a
49 changed files with 162 additions and 114 deletions
+1 -1
View File
@@ -349,7 +349,7 @@ std::tuple<CommandCost, GroupID> CmdCreateGroup(DoCommandFlags flags, VehicleTyp
}
if (flags.Test(DoCommandFlag::Execute)) {
Group *g = new Group(_current_company, vt);
Group *g = Group::Create(_current_company, vt);
Company *c = Company::Get(g->owner);
g->number = c->freegroups.UseID(c->freegroups.NextID());