diff options
author | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2016-05-05 13:35:45 +0200 |
---|---|---|
committer | Christoph Hertzberg <chtz@informatik.uni-bremen.de> | 2016-05-05 13:35:45 +0200 |
commit | dacb469bc93b5b8578afad19d327606659ec3a55 (patch) | |
tree | 8fdff5d859a812adfcc8ff01826b5be3096bff05 /test/linearstructure.cpp | |
parent | 62b710072e282ad70bbcb38468367f7f99232d32 (diff) |
Enable and fix -Wdouble-conversion warnings
Diffstat (limited to 'test/linearstructure.cpp')
-rw-r--r-- | test/linearstructure.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/linearstructure.cpp b/test/linearstructure.cpp index 292f33969..e7f4b3dc5 100644 --- a/test/linearstructure.cpp +++ b/test/linearstructure.cpp @@ -21,6 +21,7 @@ template<typename MatrixType> void linearStructure(const MatrixType& m) */ typedef typename MatrixType::Index Index; typedef typename MatrixType::Scalar Scalar; + typedef typename MatrixType::RealScalar RealScalar; Index rows = m.rows(); Index cols = m.cols(); @@ -32,7 +33,7 @@ template<typename MatrixType> void linearStructure(const MatrixType& m) m3(rows, cols); Scalar s1 = internal::random<Scalar>(); - while (abs(s1)<1e-3) s1 = internal::random<Scalar>(); + while (abs(s1)<RealScalar(1e-3)) s1 = internal::random<Scalar>(); Index r = internal::random<Index>(0, rows-1), c = internal::random<Index>(0, cols-1); |