Codechange: Simplify IsCompanyBuildableVehicleType. (#12868)

This commit is contained in:
Joan Josep 2024-11-06 20:09:09 +01:00 committed by GitHub
parent 3b6d3080f2
commit 5d7a7b2955
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}
} }
/** /**