Codechange: Remove min/max functions in favour of STL variants (#8502)
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user