From fae2dd034462c5a6b086e46b3437ea6e2456d5eb Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 19 Apr 2018 23:01:50 -0400 Subject: math_util: Remove the Clamp() function C++17 adds clamp() to the standard library, so we can remove ours in favor of it. --- src/common/math_util.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/common') diff --git a/src/common/math_util.h b/src/common/math_util.h index 45a1ed367..c6a83c953 100644 --- a/src/common/math_util.h +++ b/src/common/math_util.h @@ -17,11 +17,6 @@ inline bool IntervalsIntersect(unsigned start0, unsigned length0, unsigned start return (std::max(start0, start1) < std::min(start0 + length0, start1 + length1)); } -template -inline T Clamp(const T val, const T& min, const T& max) { - return std::max(min, std::min(max, val)); -} - template struct Rectangle { T left; -- cgit v1.2.3