diff options
| author | Léo Lam <leo@innovatetechnologi.es> | 2017-12-26 00:38:44 +0100 |
|---|---|---|
| committer | Léo Lam <leo@innovatetechnologi.es> | 2019-05-04 23:12:17 +0200 |
| commit | ab9ece9bcab8a6d55dbe6f3a904d49231e5f73e1 (patch) | |
| tree | 3993f73a513f6f80ecddff85882042b73da261da /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | 6f84984b7b0514227327b2e2c5ef10907d150b96 (diff) | |
Replace MathUtil::Clamp with std::clamp
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 523a681884..222b1ba9ab 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -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; |
