Replace MathUtil::Clamp with std::clamp

This commit is contained in:
Léo Lam 2017-12-26 00:38:44 +01:00
parent 6f84984b7b
commit ab9ece9bca
31 changed files with 101 additions and 109 deletions

View file

@ -14,6 +14,7 @@
#include "VideoCommon/RenderBase.h"
#include <algorithm>
#include <cinttypes>
#include <cmath>
#include <memory>
@ -218,11 +219,11 @@ u32 Renderer::AccessEFB(EFBAccessType type, u32 x, u32 y, u32 poke_data)
if (bpmem.zcontrol.pixel_format == PEControl::RGB565_Z16)
{
// if Z is in 16 bit format you must return a 16 bit integer
ret = MathUtil::Clamp<u32>(static_cast<u32>(depth * 65536.0f), 0, 0xFFFF);
ret = std::clamp<u32>(static_cast<u32>(depth * 65536.0f), 0, 0xFFFF);
}
else
{
ret = MathUtil::Clamp<u32>(static_cast<u32>(depth * 16777216.0f), 0, 0xFFFFFF);
ret = std::clamp<u32>(static_cast<u32>(depth * 16777216.0f), 0, 0xFFFFFF);
}
return ret;