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

@@ -409,13 +409,13 @@ static void CommonRaiseLowerBigLand(TileIndex tile, int mode)
/* Raise land */
h = MAX_TILE_HEIGHT;
TILE_AREA_LOOP(tile2, ta) {
h = min(h, TileHeight(tile2));
h = std::min(h, TileHeight(tile2));
}
} else {
/* Lower land */
h = 0;
TILE_AREA_LOOP(tile2, ta) {
h = max(h, TileHeight(tile2));
h = std::max(h, TileHeight(tile2));
}
}
@@ -547,8 +547,8 @@ struct ScenarioEditorLandscapeGenerationWindow : Window {
{
if (widget != WID_ETT_DOTS) return;
size->width = max<uint>(size->width, ScaleGUITrad(59));
size->height = max<uint>(size->height, ScaleGUITrad(31));
size->width = std::max<uint>(size->width, ScaleGUITrad(59));
size->height = std::max<uint>(size->height, ScaleGUITrad(31));
}
void DrawWidget(const Rect &r, int widget) const override