Codechange: Use enum class for RoadTileType.

This commit is contained in:
Peter Nelson
2025-11-17 19:49:36 +00:00
committed by dP
parent c2554e3149
commit 33b77c6616
8 changed files with 57 additions and 57 deletions

View File

@@ -37,7 +37,7 @@
/* Tram bits aren't considered buildable */
if (::GetRoadTypeTram(tile) != INVALID_ROADTYPE) return false;
/* Depots and crossings aren't considered buildable */
if (::GetRoadTileType(tile) != ROAD_TILE_NORMAL) return false;
if (::GetRoadTileType(tile) != RoadTileType::Normal) return false;
if (!HasExactlyOneBit(::GetRoadBits(tile, RTT_ROAD))) return false;
if (::IsRoadOwner(tile, RTT_ROAD, OWNER_TOWN)) return true;
if (::IsRoadOwner(tile, RTT_ROAD, ScriptObject::GetCompany())) return true;