diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-08-13 09:56:53 -0400 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2009-08-13 09:56:53 -0400 |
commit | 76a3089a43752859893422bdd3d41874c465a44e (patch) | |
tree | cd4905475b7a4db708c5ac67da215cf4b0fbe884 /Eigen/src/Core/IO.h | |
parent | 13b191d94ba69371a59f2cdc4ea510205cc24a68 (diff) |
oops, don't set the precision to -1 !!
Diffstat (limited to 'Eigen/src/Core/IO.h')
-rw-r--r-- | Eigen/src/Core/IO.h | 5 |
1 files 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<int>(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; } |