mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 06:15:04 +00:00
Codechange: Simplify IsCompanyBuildableVehicleType. (#12868)
This commit is contained in:
parent
3b6d3080f2
commit
5d7a7b2955
@ -90,15 +90,7 @@ Direction GetDirectionTowards(const Vehicle *v, int x, int y);
|
|||||||
*/
|
*/
|
||||||
inline bool IsCompanyBuildableVehicleType(VehicleType type)
|
inline bool IsCompanyBuildableVehicleType(VehicleType type)
|
||||||
{
|
{
|
||||||
switch (type) {
|
return type < VEH_COMPANY_END;
|
||||||
case VEH_TRAIN:
|
|
||||||
case VEH_ROAD:
|
|
||||||
case VEH_SHIP:
|
|
||||||
case VEH_AIRCRAFT:
|
|
||||||
return true;
|
|
||||||
|
|
||||||
default: return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user