Codechange: Use EnumBitSet for RoadTypes.
This commit is contained in:
committed by
Peter Nelson
parent
819e097d6e
commit
732109e444
@@ -218,10 +218,10 @@ template <bool Tfrom, bool Tvia>
|
||||
if (!ScriptRoad::IsRoadTypeAvailable(road_type)) return false;
|
||||
|
||||
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;
|
||||
if (::GetPresentRoadTypes(rs->xy).Test(::RoadType(road_type))) return true;
|
||||
}
|
||||
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;
|
||||
if (::GetPresentRoadTypes(rs->xy).Test(::RoadType(road_type))) return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user