Codechange: Remove min/max functions in favour of STL variants (#8502)

This commit is contained in:
Charles Pigott
2021-01-08 10:16:18 +00:00
committed by GitHub
parent c1fddb9a6a
commit 9b800a96ed
181 changed files with 900 additions and 954 deletions

View File

@@ -95,14 +95,14 @@ public:
uint tile_y = (TileY(tile) / N) * N;
uint w = N, h = N;
w += min(extend * N, tile_x);
h += min(extend * N, tile_y);
w += std::min(extend * N, tile_x);
h += std::min(extend * N, tile_y);
tile_x -= min(extend * N, tile_x);
tile_y -= min(extend * N, tile_y);
tile_x -= std::min(extend * N, tile_x);
tile_y -= std::min(extend * N, tile_y);
w += min(extend * N, MapSizeX() - tile_x - w);
h += min(extend * N, MapSizeY() - tile_y - h);
w += std::min(extend * N, MapSizeX() - tile_x - w);
h += std::min(extend * N, MapSizeY() - tile_y - h);
return TileArea(TileXY(tile_x, tile_y), w, h);
}