1
0
Fork 0

Codechange: Simplify IsCompanyBuildableVehicleType.

pull/12868/head
J0anJosep 2024-07-17 21:51:50 +02:00
parent 891e53c72e
commit 7d2791d5cf
1 changed files with 1 additions and 9 deletions

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