1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +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

@@ -13,7 +13,6 @@
#include "Editor.h"
#include "Input.h"
#include "OpenRCT2.h"
#include "core/Math.hpp"
#include "interface/Screenshot.h"
#include "localisation/Date.h"
#include "localisation/Localisation.h"
@@ -30,6 +29,8 @@
#include "world/Park.h"
#include "world/Scenery.h"
#include <algorithm>
using namespace OpenRCT2;
GameState::GameState()
@@ -97,7 +98,7 @@ void GameState::Update()
else
{
numUpdates = gTicksSinceLastUpdate / GAME_UPDATE_TIME_MS;
numUpdates = Math::Clamp<uint32_t>(1, numUpdates, GAME_MAX_UPDATES);
numUpdates = std::clamp<uint32_t>(numUpdates, 1, GAME_MAX_UPDATES);
}
if (network_get_mode() == NETWORK_MODE_CLIENT && network_get_status() == NETWORK_STATUS_CONNECTED