1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-19 10:22:39 +01:00

Codechange: explicitly initialise Group member variables

This commit is contained in:
Rubidium
2025-02-18 16:58:58 +01:00
committed by rubidium42
parent b4a4ca83ff
commit 63e99871c1
2 changed files with 18 additions and 25 deletions

View File

@@ -319,12 +319,6 @@ void UpdateCompanyGroupLiveries(const Company *c)
}
}
Group::Group(Owner owner)
{
this->owner = owner;
this->folded = false;
}
/**
* Create a new vehicle group.
@@ -346,9 +340,7 @@ std::tuple<CommandCost, GroupID> CmdCreateGroup(DoCommandFlags flags, VehicleTyp
}
if (flags.Test(DoCommandFlag::Execute)) {
Group *g = new Group(_current_company);
g->vehicle_type = vt;
g->parent = GroupID::Invalid();
Group *g = new Group(_current_company, vt);
Company *c = Company::Get(g->owner);
g->number = c->freegroups.UseID(c->freegroups.NextID());