diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-12-21 18:23:39 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-08-29 11:10:05 -0700 |
| commit | 3b9a048291bd9edeb69cb8c074ac3cbba3744531 (patch) | |
| tree | b6d78791a7339d8078bbb8bc49059f7dfe2e011e /Source/Core/VideoBackends/Software/Tev.cpp | |
| parent | bae0f21f74b1c63beb95adb80b180f835963f066 (diff) | |
SW/Tev: Use std::clamp for Clamp255 and Clamp1024
Diffstat (limited to 'Source/Core/VideoBackends/Software/Tev.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/Tev.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/Core/VideoBackends/Software/Tev.cpp b/Source/Core/VideoBackends/Software/Tev.cpp index 6dd3a2aa56..f1fecdab40 100644 --- a/Source/Core/VideoBackends/Software/Tev.cpp +++ b/Source/Core/VideoBackends/Software/Tev.cpp @@ -29,12 +29,12 @@ static inline s16 Clamp255(s16 in) { - return in > 255 ? 255 : (in < 0 ? 0 : in); + return std::clamp<s16>(in, 0, 255); } static inline s16 Clamp1024(s16 in) { - return in > 1023 ? 1023 : (in < -1024 ? -1024 : in); + return std::clamp<s16>(in, -1024, 1023); } void Tev::SetRasColor(RasColorChan colorChan, int swaptable) |
