1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 14:54:30 +01:00

Remove Math::Clamp in favour of std::clamp

This commit is contained in:
Linus Unnebäck
2018-08-12 12:50:40 +01:00
parent 54fe6a7590
commit fd07be587a
101 changed files with 248 additions and 249 deletions

View File

@@ -7,12 +7,12 @@
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include <algorithm>
#include <openrct2-ui/interface/Widget.h>
#include <openrct2-ui/windows/Window.h>
#include <openrct2/Context.h>
#include <openrct2/OpenRCT2.h>
#include <openrct2/audio/audio.h>
#include <openrct2/core/Math.hpp>
#include <openrct2/drawing/Drawing.h>
#include <openrct2/drawing/Font.h>
#include <openrct2/localisation/Localisation.h>
@@ -127,7 +127,7 @@ rct_window* window_error_open(rct_string_id title, rct_string_id message)
int32_t screenHeight = context_get_height();
const CursorState* state = context_get_cursor_state();
x = state->x - (width / 2);
x = Math::Clamp(0, x, screenWidth);
x = std::clamp(x, 0, screenWidth);
y = state->y + 26;
y = std::max(22, y);