CID 727986: Not restoring ostream format (STREAM_FORMAT_STATE)
At (20): Changing format state of stream "out" for category precision without later restoring it.
Signed-off-by: Sage Weil <sage@inktank.com>
float weight = q.front().weight;
q.pop_front();
- out << cur << "\t" << std::setprecision(4) << weight << "\t";
+ out << cur << "\t";
+ int oldprecision = out.precision();
+ out << std::setprecision(4) << weight << std::setprecision(oldprecision) << "\t";
+
for (int k=0; k<depth; k++)
out << "\t";