diff options
author | AJR <ajrhacker@users.noreply.github.com> | 2021-08-15 21:29:39 -0400 |
---|---|---|
committer | AJR <ajrhacker@users.noreply.github.com> | 2021-08-15 21:32:53 -0400 |
commit | 0298e5d6c376f5df0cefe1b9a84840eba39f0ebc (patch) | |
tree | 719da5f05bade2379610254ce842e0896ed0bd71 /src/osd/modules/render/d3d/d3dhlsl.cpp | |
parent | 08a0e5af5be40da3b97302d85961f32ddee2bd54 (diff) |
Use std::clamp in more source files
Diffstat (limited to 'src/osd/modules/render/d3d/d3dhlsl.cpp')
-rw-r--r-- | src/osd/modules/render/d3d/d3dhlsl.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/osd/modules/render/d3d/d3dhlsl.cpp b/src/osd/modules/render/d3d/d3dhlsl.cpp index 4b1087826b5..0137e23acce 100644 --- a/src/osd/modules/render/d3d/d3dhlsl.cpp +++ b/src/osd/modules/render/d3d/d3dhlsl.cpp @@ -1098,9 +1098,9 @@ rgb_t shaders::apply_color_convolution(rgb_t color) b = chroma[2] * saturation + luma; return rgb_t( - std::max(0, std::min(255, int(r * 255.0f))), - std::max(0, std::min(255, int(g * 255.0f))), - std::max(0, std::min(255, int(b * 255.0f)))); + std::clamp(int(r * 255.0f), 0, 255), + std::clamp(int(g * 255.0f), 0, 255), + std::clamp(int(b * 255.0f), 0, 255)); } int shaders::color_convolution_pass(d3d_render_target *rt, int source_index, poly_info *poly, int vertnum) |