diff options
author | Hauke Heibel <hauke.heibel@gmail.com> | 2010-02-11 11:39:02 +0100 |
---|---|---|
committer | Hauke Heibel <hauke.heibel@gmail.com> | 2010-02-11 11:39:02 +0100 |
commit | ae0a17d30be41bf66a2915ce7b059f818a820241 (patch) | |
tree | a463aa40f4ecfc3ca27fefefe6a6924dab0c4e1c | |
parent | 13ce92f5ba8a17530d837c145df88837eee0076c (diff) |
Here is the proper fix.
-rw-r--r-- | Eigen/src/Core/MathFunctions.h | 6 | ||||
-rw-r--r-- | Eigen/src/Core/NumTraits.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/Eigen/src/Core/MathFunctions.h b/Eigen/src/Core/MathFunctions.h index d9119c245..1a4561555 100644 --- a/Eigen/src/Core/MathFunctions.h +++ b/Eigen/src/Core/MathFunctions.h @@ -321,15 +321,15 @@ template<> inline bool ei_random() { return (ei_random<int>(0,1) == 1); } -inline bool ei_isMuchSmallerThan(bool a, bool, bool = false/*NumTraits<bool>::dummy_precision()*/) +inline bool ei_isMuchSmallerThan(bool a, bool, bool = NumTraits<bool>::dummy_precision()) { return !a; } -inline bool ei_isApprox(bool a, bool b, bool = false/*NumTraits<bool>::dummy_precision()*/) +inline bool ei_isApprox(bool a, bool b, bool = NumTraits<bool>::dummy_precision()) { return a == b; } -inline bool ei_isApproxOrLessThan(bool a, bool b, bool = false/*NumTraits<bool>::dummy_precision()*/) +inline bool ei_isApproxOrLessThan(bool a, bool b, bool = NumTraits<bool>::dummy_precision()) { return int(a) <= int(b); } diff --git a/Eigen/src/Core/NumTraits.h b/Eigen/src/Core/NumTraits.h index 4f0cc04eb..37787b569 100644 --- a/Eigen/src/Core/NumTraits.h +++ b/Eigen/src/Core/NumTraits.h @@ -61,7 +61,7 @@ template<typename T> struct ei_default_float_numtraits template<typename T> struct ei_default_integral_numtraits : std::numeric_limits<T> { - inline static int dummy_precision() { return 0; } + inline static T dummy_precision() { return T(0); } inline static T highest() { return std::numeric_limits<T>::max(); } inline static T lowest() { return std::numeric_limits<T>::min(); } }; |