CID 727987: Not restoring ostream format (STREAM_FORMAT_STATE)At (5): Changing
format state of stream "out" for category precision without later restoring it.
Signed-off-by: Samuel Just <sam.just@inktank.com>
out << "up\t";
else
out << "down\t";
- out << std::setprecision(4) << (exists(cur) ? get_weightf(cur) : 0) << "\t";
+ std::streamsize p = out.precision();
+ out << std::setprecision(4)
+ << (exists(cur) ? get_weightf(cur) : 0)
+ << std::setprecision(p)
+ << "\t";
}
}