oops, don't set the precision to -1 !!

This commit is contained in:
Benoit Jacob 2009-08-13 09:56:53 -04:00
parent 13b191d94b
commit 76a3089a43

View File

@ -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;
}