diff options
author | Sergey Yershov <syershov@maps.me> | 2017-01-09 19:54:06 +0300 |
---|---|---|
committer | Sergey Yershov <syershov@maps.me> | 2017-01-10 18:02:24 +0300 |
commit | 5fc11e9bea22f57793758c4909177404d39369cc (patch) | |
tree | 1f7a79e2499b0fc9bb37512ae0ca01a68e75bd99 /base | |
parent | fc09a7d305e2f8bc536ff5e0a76fa4f7d962a978 (diff) |
Fix compile warningsfix-warning
Diffstat (limited to 'base')
-rw-r--r-- | base/math.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/base/math.hpp b/base/math.hpp index a213d6a2a3..396be414ea 100644 --- a/base/math.hpp +++ b/base/math.hpp @@ -102,8 +102,8 @@ template <typename T> inline T sq(T const & x) return x * x; } -template <typename T, typename TMin, typename TMax> -inline T clamp(T x, TMin xmin, TMax xmax) +template <typename T> +inline T clamp(T const x, T const xmin, T const xmax) { if (x > xmax) return xmax; @@ -113,7 +113,7 @@ inline T clamp(T x, TMin xmin, TMax xmax) } template <typename T> -inline T cyclicClamp(T x, T xmin, T xmax) +inline T cyclicClamp(T const x, T const xmin, T const xmax) { if (x > xmax) return xmin; @@ -122,11 +122,11 @@ inline T cyclicClamp(T x, T xmin, T xmax) return x; } -template <typename T> inline bool between_s(T a, T b, T x) +template <typename T> inline bool between_s(T const a, T const b, T const x) { return (a <= x && x <= b); } -template <typename T> inline bool between_i(T a, T b, T x) +template <typename T> inline bool between_i(T const a, T const b, T const x) { return (a < x && x < b); } |