diff --git a/src/script/api/script_station.hpp b/src/script/api/script_station.hpp index b9b95bc467..0c43deef3c 100644 --- a/src/script/api/script_station.hpp +++ b/src/script/api/script_station.hpp @@ -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 }; diff --git a/src/script/api/script_waypoint.hpp b/src/script/api/script_waypoint.hpp index 5b8f0b65f9..81edf2b457 100644 --- a/src/script/api/script_waypoint.hpp +++ b/src/script/api/script_waypoint.hpp @@ -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 };