Codechange: Use enum class for RailGroundType.

This commit is contained in:
Peter Nelson
2025-11-17 19:49:36 +00:00
committed by dP
parent 6f6c3834dc
commit 99fafcb960
7 changed files with 89 additions and 89 deletions
+1 -1
View File
@@ -350,7 +350,7 @@ uint32_t GetTerrainType(TileIndex tile, TileContext context)
/* During map generation the snowstate may not be valid yet, as the tileloop may not have run yet. */
if (_generating_world) goto genworld; // we do not care about foundations here
RailGroundType ground = GetRailGroundType(tile);
has_snow = (ground == RAIL_GROUND_ICE_DESERT || (context == TCX_UPPER_HALFTILE && ground == RAIL_GROUND_HALF_SNOW));
has_snow = (ground == RailGroundType::SnowOrDesert || (context == TCX_UPPER_HALFTILE && ground == RailGroundType::HalfTileSnow));
break;
}