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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user