Enable and fix -Wdouble-conversion warnings

This commit is contained in:
Christoph Hertzberg
2016-05-05 13:35:45 +02:00
parent 62b710072e
commit dacb469bc9
34 changed files with 86 additions and 80 deletions

View File

@@ -1192,7 +1192,7 @@ double tanh(const double &x) { return ::tanh(x); }
template <typename T>
EIGEN_DEVICE_FUNC EIGEN_ALWAYS_INLINE
T fmod(const T& a, const T& b) {
EIGEN_USING_STD_MATH(floor);
EIGEN_USING_STD_MATH(fmod);
return fmod(a, b);
}

View File

@@ -880,9 +880,9 @@ struct scalar_sign_op<Scalar,true> {
{
typedef typename NumTraits<Scalar>::Real real_type;
real_type aa = numext::abs(a);
if (aa==0)
if (aa==real_type(0))
return Scalar(0);
aa = 1./aa;
aa = real_type(1)/aa;
return Scalar(real(a)*aa, imag(a)*aa );
}
//TODO