diff options
author | Charles Pigott <charlespigott@googlemail.com> | 2021-01-08 10:16:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-08 11:16:18 +0100 |
commit | 9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch) | |
tree | 3f287d339e15c4902ee415556475fd9b2918d33c /src/engine_gui.cpp | |
parent | c1fddb9a6ae5c3af6865461a7295788a341011a2 (diff) | |
download | openttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz |
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/engine_gui.cpp')
-rw-r--r-- | src/engine_gui.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/engine_gui.cpp b/src/engine_gui.cpp index b71fa7a6b..77ce95413 100644 --- a/src/engine_gui.cpp +++ b/src/engine_gui.cpp @@ -93,9 +93,9 @@ struct EnginePreviewWindow : Window { case VEH_SHIP: GetShipSpriteSize( engine, x, y, x_offs, y_offs, image_type); break; case VEH_AIRCRAFT: GetAircraftSpriteSize(engine, x, y, x_offs, y_offs, image_type); break; } - this->vehicle_space = max<int>(40, y - y_offs); + this->vehicle_space = std::max<int>(40, y - y_offs); - size->width = max(size->width, x - x_offs); + size->width = std::max(size->width, x - x_offs); SetDParam(0, GetEngineCategoryName(engine)); size->height = GetStringHeight(STR_ENGINE_PREVIEW_MESSAGE, size->width) + WD_PAR_VSEP_WIDE + FONT_HEIGHT_NORMAL + this->vehicle_space; SetDParam(0, engine); |