From 8b902a6f26838559d5cb553e1c579b64f7d95f61 Mon Sep 17 00:00:00 2001 From: Norihiro Watanabe <norihiro.watanabe@ufz.de> Date: Tue, 8 Nov 2016 12:46:05 +0100 Subject: [PATCH] [Math/Eigen] EigenMatrix::write() can be called in release mode --- MathLib/LinAlg/Eigen/EigenMatrix.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/MathLib/LinAlg/Eigen/EigenMatrix.h b/MathLib/LinAlg/Eigen/EigenMatrix.h index b89712d1841..a18922166fd 100644 --- a/MathLib/LinAlg/Eigen/EigenMatrix.h +++ b/MathLib/LinAlg/Eigen/EigenMatrix.h @@ -10,10 +10,8 @@ #ifndef EIGENMATRIX_H_ #define EIGENMATRIX_H_ -#ifndef NDEBUG #include <fstream> #include <string> -#endif #include <Eigen/Sparse> @@ -145,7 +143,6 @@ public: /// return always true, i.e. the matrix is always ready for use bool isAssembled() const { return true; } -#ifndef NDEBUG /// printout this matrix for debugging void write(const std::string &filename) const { @@ -153,6 +150,7 @@ public: if (of) write(of); } + /// printout this matrix for debugging void write(std::ostream &os) const { @@ -161,7 +159,6 @@ public: os << it.row() << " " << it.col() << ": " << it.value() << "\n"; os << std::endl; } -#endif RawMatrixType& getRawMatrix() { return _mat; } const RawMatrixType& getRawMatrix() const { return _mat; } -- GitLab