From 76a3089a43752859893422bdd3d41874c465a44e Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Thu, 13 Aug 2009 09:56:53 -0400 Subject: [PATCH] oops, don't set the precision to -1 !! --- Eigen/src/Core/IO.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Eigen/src/Core/IO.h b/Eigen/src/Core/IO.h index 7cd2b683a..53e02412f 100644 --- a/Eigen/src/Core/IO.h +++ b/Eigen/src/Core/IO.h @@ -139,7 +139,8 @@ std::ostream & ei_print_matrix(std::ostream & s, const Derived& _m, const IOForm width = std::max(width, int(sstr.str().length())); } } - std::streamsize old_precision = s.precision(fmt.precision); + std::streamsize old_precision; + if(fmt.precision != -1) old_precision = s.precision(fmt.precision); s << fmt.matPrefix; for(int i = 0; i < m.rows(); ++i) { @@ -159,7 +160,7 @@ std::ostream & ei_print_matrix(std::ostream & s, const Derived& _m, const IOForm s << fmt.rowSeparator; } s << fmt.matSuffix; - s.precision(old_precision); + if(fmt.precision != -1) s.precision(old_precision); return s; }