mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2026-07-26 00:45:35 +00:00
Codechange: use static_cast/to_underlying when converting Direction
This commit is contained in:
committed by
Peter Nelson
parent
0e0e8056a7
commit
356ca9c6d9
+1
-1
@@ -892,7 +892,7 @@ static void TileLoop_Trees(TileIndex tile)
|
||||
|
||||
TreeType treetype = GetTreeType(tile);
|
||||
|
||||
tile += TileOffsByDir(static_cast<Direction>(Random() % DIR_END));
|
||||
tile += TileOffsByDir(static_cast<Direction>(RandomRange(to_underlying(Direction::End))));
|
||||
|
||||
if (!CanPlantTreesOnTile(tile, false)) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user