Codechange: Use dynamic_cast instead of C-cast after FindWindowById. (#12448)
dynamic_cast was used in most places, but not all.
This commit is contained in:
@@ -1169,7 +1169,7 @@ void ShowCompanyGroupForVehicle(const Vehicle *v)
|
||||
*/
|
||||
static inline VehicleGroupWindow *FindVehicleGroupWindow(VehicleType vt, Owner owner)
|
||||
{
|
||||
return (VehicleGroupWindow *)FindWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, owner).Pack());
|
||||
return dynamic_cast<VehicleGroupWindow *>(FindWindowById(GetWindowClassForVehicleType(vt), VehicleListIdentifier(VL_GROUP_LIST, vt, owner).Pack()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user