From f201f4f176fc908e9ddebfed86d4c8ef5582556c Mon Sep 17 00:00:00 2001 From: andrew Date: Thu, 20 Feb 2014 16:38:37 +0200 Subject: Thread safe cMap manager --- src/Globals.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 7ee045130..e4737a98a 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -235,11 +235,11 @@ public: -/** Clamp a_X to the specified range. */ +/** Clamp X to the specified range. */ template -T Clamp(T a_X, T a_Min, T a_Max) +T Clamp(T a_Value, T a_Min, T a_Max) { - return std::min(std::max(a_X, a_Min), a_Max); + return (a_Value < a_Min) ? a_Min : ((a_Value > a_Max) ? a_Max : a_Value); } -- cgit v1.2.3