From eafe426b3ccfe4f7c201c88c8b44ac3cb0fac88a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Wed, 20 Dec 2017 20:44:49 +0100 Subject: compat/util: shadowing warning false positive --- compat/util.hpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'compat') diff --git a/compat/util.hpp b/compat/util.hpp index 41c8def9..a1976e35 100644 --- a/compat/util.hpp +++ b/compat/util.hpp @@ -37,20 +37,20 @@ inline unsigned uround(const t& val) namespace util_detail { template -inline auto clamp_float(n val, n min, n max) +inline auto clamp_float(n val, n min_, n max_) { - return std::fmin(std::fmax(val, min), max); + return std::fmin(std::fmax(val, min_), max_); } template struct clamp final { - static inline auto clamp_(const n& val, const n& min, const n& max) + static inline auto clamp_(const n& val, const n& min_, const n& max_) { - if (unlikely(val > max)) - return max; - if (unlikely(val < min)) - return min; + if (unlikely(val > max_)) + return max_; + if (unlikely(val < min_)) + return min_; return val; } }; @@ -58,18 +58,18 @@ struct clamp final template struct clamp { - static inline auto clamp_(float val, float min, float max) + static inline auto clamp_(float val, float min_, float max_) { - return clamp_float(val, min, max); + return clamp_float(val, min_, max_); } }; template struct clamp { - static inline auto clamp_(double val, double min, double max) + static inline auto clamp_(double val, double min_, double max_) { - return clamp_float(val, min, max); + return clamp_float(val, min_, max_); } }; -- cgit v1.2.3