forked from mirror/OpenTTD
Codechange: Don't use enums for non-enumerated values. (#13031)
In the past we have used enums to hold an arbitrary values. These values are not enumerated types, so make them constants instead.
This commit is contained in:
@@ -630,13 +630,11 @@ void UpdateAircraftCache(Aircraft *v, bool update_range)
|
||||
/**
|
||||
* Special velocities for aircraft
|
||||
*/
|
||||
enum AircraftSpeedLimits {
|
||||
SPEED_LIMIT_TAXI = 50, ///< Maximum speed of an aircraft while taxiing
|
||||
SPEED_LIMIT_APPROACH = 230, ///< Maximum speed of an aircraft on finals
|
||||
SPEED_LIMIT_BROKEN = 320, ///< Maximum speed of an aircraft that is broken
|
||||
SPEED_LIMIT_HOLD = 425, ///< Maximum speed of an aircraft that flies the holding pattern
|
||||
SPEED_LIMIT_NONE = 0xFFFF, ///< No environmental speed limit. Speed limit is type dependent
|
||||
};
|
||||
static constexpr uint16_t SPEED_LIMIT_TAXI = 50; ///< Maximum speed of an aircraft while taxiing
|
||||
static constexpr uint16_t SPEED_LIMIT_APPROACH = 230; ///< Maximum speed of an aircraft on finals
|
||||
static constexpr uint16_t SPEED_LIMIT_BROKEN = 320; ///< Maximum speed of an aircraft that is broken
|
||||
static constexpr uint16_t SPEED_LIMIT_HOLD = 425; ///< Maximum speed of an aircraft that flies the holding pattern
|
||||
static constexpr uint16_t SPEED_LIMIT_NONE = UINT16_MAX; ///< No environmental speed limit. Speed limit is type dependent
|
||||
|
||||
/**
|
||||
* Sets the new speed for an aircraft
|
||||
|
Reference in New Issue
Block a user