diff options
author | Uwe Klotz <uwe_klotz@web.de> | 2014-11-17 09:34:11 +0100 |
---|---|---|
committer | Uwe Klotz <uwe_klotz@web.de> | 2014-11-17 21:35:50 +0100 |
commit | f91aeacb34d18adc17d9faffcbe3bbcd621d3e85 (patch) | |
tree | 08c9cb2294a9869c7bdde7bb13d7fe1e898c0a6b /src/util/math.h | |
parent | 74e6dec6eeca9da5f8572749ec7e1a23d8d9fbc9 (diff) |
math_clamp_safe() should always print a warning upon invalid bounds
Diffstat (limited to 'src/util/math.h')
-rw-r--r-- | src/util/math.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/util/math.h b/src/util/math.h index f2c839069c..24078775e6 100644 --- a/src/util/math.h +++ b/src/util/math.h @@ -9,8 +9,6 @@ #include <QtDebug> -#include "util/cmdlineargs.h" - // If we don't do this then we get the C90 fabs from the global namespace which // is only defined for double. using std::fabs; @@ -28,7 +26,7 @@ template <typename T> inline T math_clamp_safe(T value, T min, T max) { // XXX: If max < min, behavior is undefined, and has been causing problems. // if debugging is on, assert when this happens. - if (CmdlineArgs::Instance().getDeveloper() && max < min) { + if (max < min) { qWarning() << "PROGRAMMING ERROR: math_clamp called with max < min! " << max << " " << min; } |