From 9b800a96ed32720ff60b74e498a0e0a6351004f9 Mon Sep 17 00:00:00 2001 From: Charles Pigott Date: Fri, 8 Jan 2021 10:16:18 +0000 Subject: Codechange: Remove min/max functions in favour of STL variants (#8502) --- src/elrail.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/elrail.cpp') diff --git a/src/elrail.cpp b/src/elrail.cpp index 1e35978af..5d8f2b8f3 100644 --- a/src/elrail.cpp +++ b/src/elrail.cpp @@ -229,7 +229,8 @@ static int GetPCPElevation(TileIndex tile, DiagDirection PCPpos) * Also note that the result of GetSlopePixelZ() is very special on bridge-ramps. */ - int z = GetSlopePixelZ(TileX(tile) * TILE_SIZE + min(x_pcp_offsets[PCPpos], TILE_SIZE - 1), TileY(tile) * TILE_SIZE + min(y_pcp_offsets[PCPpos], TILE_SIZE - 1)); + int z = GetSlopePixelZ(TileX(tile) * TILE_SIZE + std::min(x_pcp_offsets[PCPpos], TILE_SIZE - 1), + TileY(tile) * TILE_SIZE + std::min(y_pcp_offsets[PCPpos], TILE_SIZE - 1)); return (z + 2) & ~3; // this means z = (z + TILE_HEIGHT / 4) / (TILE_HEIGHT / 2) * (TILE_HEIGHT / 2); } -- cgit v1.2.3-54-g00ecf