mirror of https://github.com/OpenTTD/OpenTTD
Codefix 75387b9e2b: Prefer using EnumBitSet.base() instead of shifting StationFacility. (#13575)
parent
e8beb0eff3
commit
443d7ece29
|
@ -44,11 +44,11 @@ public:
|
|||
*/
|
||||
enum StationType {
|
||||
/* Note: these values represent part of the in-game StationFacilities enum */
|
||||
STATION_TRAIN = (1 << to_underlying(::StationFacility::Train)), ///< Train station
|
||||
STATION_TRUCK_STOP = (1 << to_underlying(::StationFacility::TruckStop)), ///< Truck station
|
||||
STATION_BUS_STOP = (1 << to_underlying(::StationFacility::BusStop)), ///< Bus station
|
||||
STATION_AIRPORT = (1 << to_underlying(::StationFacility::Airport)), ///< Airport
|
||||
STATION_DOCK = (1 << to_underlying(::StationFacility::Dock)), ///< Dock
|
||||
STATION_TRAIN = ::StationFacilities{::StationFacility::Train}.base(), ///< Train station
|
||||
STATION_TRUCK_STOP = ::StationFacilities{::StationFacility::TruckStop}.base(), ///< Truck station
|
||||
STATION_BUS_STOP = ::StationFacilities{::StationFacility::BusStop}.base(), ///< Bus station
|
||||
STATION_AIRPORT = ::StationFacilities{::StationFacility::Airport}.base(), ///< Airport
|
||||
STATION_DOCK = ::StationFacilities{::StationFacility::Dock}.base(), ///< Dock
|
||||
STATION_ANY = STATION_TRAIN | STATION_TRUCK_STOP | STATION_BUS_STOP | STATION_AIRPORT | STATION_DOCK, ///< All station types
|
||||
};
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@ public:
|
|||
*/
|
||||
enum WaypointType {
|
||||
/* Note: these values represent part of the in-game StationFacilities enum */
|
||||
WAYPOINT_RAIL = (1U << to_underlying(::StationFacility::Train)), ///< Rail waypoint
|
||||
WAYPOINT_BUOY = (1U << to_underlying(::StationFacility::Dock)), ///< Buoy
|
||||
WAYPOINT_RAIL = ::StationFacilities{::StationFacility::Train}.base(), ///< Rail waypoint
|
||||
WAYPOINT_BUOY = ::StationFacilities{::StationFacility::Dock}.base(), ///< Buoy
|
||||
WAYPOINT_ANY = WAYPOINT_RAIL | WAYPOINT_BUOY, ///< All waypoint types
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue