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

@@ -513,7 +513,7 @@ struct GenerateLandscapeWindow : public Window {
}
}
size->width += padding.width;
size->height = max(size->height, (uint)(FONT_HEIGHT_NORMAL + WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM));
size->height = std::max(size->height, (uint)(FONT_HEIGHT_NORMAL + WD_DROPDOWNTEXT_TOP + WD_DROPDOWNTEXT_BOTTOM));
}
void DrawWidget(const Rect &r, int widget) const override
@@ -1214,7 +1214,7 @@ struct GenerateProgressWindow : public Window {
case WID_GP_PROGRESS_TEXT:
for (uint i = 0; i < GWP_CLASS_COUNT; i++) {
size->width = max(size->width, GetStringBoundingBox(_generation_class_table[i]).width);
size->width = std::max(size->width, GetStringBoundingBox(_generation_class_table[i]).width);
}
size->height = FONT_HEIGHT_NORMAL * 2 + WD_PAR_VSEP_NORMAL;
break;