summaryrefslogtreecommitdiff
path: root/src/tree_cmd.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-01-08 10:16:18 +0000
committerGitHub <noreply@github.com>2021-01-08 11:16:18 +0100
commit9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch)
tree3f287d339e15c4902ee415556475fd9b2918d33c /src/tree_cmd.cpp
parentc1fddb9a6ae5c3af6865461a7295788a341011a2 (diff)
downloadopenttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/tree_cmd.cpp')
-rw-r--r--src/tree_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tree_cmd.cpp b/src/tree_cmd.cpp
index 60eb781f5..f4610b569 100644
--- a/src/tree_cmd.cpp
+++ b/src/tree_cmd.cpp
@@ -163,7 +163,7 @@ static void PlaceTree(TileIndex tile, uint32 r)
TreeType tree = GetRandomTreeType(tile, GB(r, 24, 8));
if (tree != TREE_INVALID) {
- PlantTreesOnTile(tile, tree, GB(r, 22, 2), min(GB(r, 16, 3), 6));
+ PlantTreesOnTile(tile, tree, GB(r, 22, 2), std::min<byte>(GB(r, 16, 3), 6));
/* Rerandomize ground, if neither snow nor shore */
TreeGround ground = GetTreeGround(tile);
@@ -658,7 +658,7 @@ static void TileLoopTreesAlps(TileIndex tile)
default: return;
}
} else {
- uint density = min<uint>(k, 3);
+ uint density = std::min<uint>(k, 3);
if (GetTreeGround(tile) != TREE_GROUND_SNOW_DESERT && GetTreeGround(tile) != TREE_GROUND_ROUGH_SNOW) {
TreeGround tg = GetTreeGround(tile) == TREE_GROUND_ROUGH ? TREE_GROUND_ROUGH_SNOW : TREE_GROUND_SNOW_DESERT;