mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-24 12:06:41 +00:00
Codechange: make VehicleListType scoped
This commit is contained in:
+2
-2
@@ -1231,7 +1231,7 @@ static void ShowCompanyGroupInternal(CompanyID company, VehicleType vehicle_type
|
||||
if (!Company::IsValidID(company)) return;
|
||||
|
||||
assert(to_underlying(vehicle_type) < std::size(_vehicle_group_desc));
|
||||
VehicleListIdentifier vli(VL_GROUP_LIST, vehicle_type, company);
|
||||
VehicleListIdentifier vli(VehicleListType::Group, vehicle_type, company);
|
||||
VehicleGroupWindow *w = AllocateWindowDescFront<VehicleGroupWindow, Tneed_existing_window>(_vehicle_group_desc[vehicle_type], vli.ToWindowNumber(), vli);
|
||||
if (w != nullptr) w->SelectGroup(group);
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ void ShowCompanyGroupForVehicle(const Vehicle *v)
|
||||
*/
|
||||
static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner owner)
|
||||
{
|
||||
return dynamic_cast<VehicleGroupWindow *>(FindWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, owner).ToWindowNumber()));
|
||||
return dynamic_cast<VehicleGroupWindow *>(FindWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VehicleListType::Group, vt, owner).ToWindowNumber()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user