summaryrefslogtreecommitdiff
path: root/src/error_gui.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2021-01-08 10:16:18 +0000
committerGitHub <noreply@github.com>2021-01-08 11:16:18 +0100
commit9b800a96ed32720ff60b74e498a0e0a6351004f9 (patch)
tree3f287d339e15c4902ee415556475fd9b2918d33c /src/error_gui.cpp
parentc1fddb9a6ae5c3af6865461a7295788a341011a2 (diff)
downloadopenttd-9b800a96ed32720ff60b74e498a0e0a6351004f9.tar.xz
Codechange: Remove min/max functions in favour of STL variants (#8502)
Diffstat (limited to 'src/error_gui.cpp')
-rw-r--r--src/error_gui.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/error_gui.cpp b/src/error_gui.cpp
index 381d67a96..f9d88a199 100644
--- a/src/error_gui.cpp
+++ b/src/error_gui.cpp
@@ -189,7 +189,7 @@ public:
CopyInDParam(0, this->decode_params, lengthof(this->decode_params));
if (this->textref_stack_size > 0) StartTextRefStackUsage(this->textref_stack_grffile, this->textref_stack_size, this->textref_stack);
- int text_width = max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
+ int text_width = std::max(0, (int)size->width - WD_FRAMETEXT_LEFT - WD_FRAMETEXT_RIGHT);
this->height_summary = GetStringHeight(this->summary_msg, text_width);
this->height_detailed = (this->detailed_msg == INVALID_STRING_ID) ? 0 : GetStringHeight(this->detailed_msg, text_width);
@@ -198,13 +198,13 @@ public:
uint panel_height = WD_FRAMERECT_TOP + this->height_summary + WD_FRAMERECT_BOTTOM;
if (this->detailed_msg != INVALID_STRING_ID) panel_height += this->height_detailed + WD_PAR_VSEP_WIDE;
- size->height = max(size->height, panel_height);
+ size->height = std::max(size->height, panel_height);
break;
}
case WID_EM_FACE: {
Dimension face_size = GetSpriteSize(SPR_GRADIENT);
- size->width = max(size->width, face_size.width);
- size->height = max(size->height, face_size.height);
+ size->width = std::max(size->width, face_size.width);
+ size->height = std::max(size->height, face_size.height);
break;
}
}