Codechange: Make RoadStopType an enum class. (#13340)

This commit is contained in:
Peter Nelson
2025-01-19 21:43:17 +00:00
committed by GitHub
parent 65665ccb78
commit 5f0e4cd646
11 changed files with 61 additions and 57 deletions

View File

@@ -217,10 +217,10 @@ template <bool Tfrom, bool Tvia>
if (!IsValidStation(station_id)) return false;
if (!ScriptRoad::IsRoadTypeAvailable(road_type)) return false;
for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(ROADSTOP_BUS); rs != nullptr; rs = rs->next) {
for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(RoadStopType::Bus); rs != nullptr; rs = rs->next) {
if (HasBit(::GetPresentRoadTypes(rs->xy), (::RoadType)road_type)) return true;
}
for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(ROADSTOP_TRUCK); rs != nullptr; rs = rs->next) {
for (const RoadStop *rs = ::Station::Get(station_id)->GetPrimaryRoadStop(RoadStopType::Truck); rs != nullptr; rs = rs->next) {
if (HasBit(::GetPresentRoadTypes(rs->xy), (::RoadType)road_type)) return true;
}