1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 10:15:36 +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

@@ -11,7 +11,8 @@
#include "Date.h"
#include "core/Guard.hpp"
#include "core/Math.hpp"
#include <algorithm>
using namespace OpenRCT2;
@@ -37,7 +38,7 @@ Date Date::FromYMD(int32_t year, int32_t month, int32_t day)
if (day != 0)
{
auto daysInMonth = GetDaysInMonth(month);
day = Math::Clamp(0, day, daysInMonth - 1);
day = std::clamp(day, 0, daysInMonth - 1);
monthTicks = (day << 16) / daysInMonth;
}