diff options
author | Erik Schnetter <schnetter@gmail.com> | 2012-02-25 11:13:57 -0500 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2012-09-11 18:23:06 +0100 |
commit | 78a64fd4e7b646874ee1a7e5904f31301e920278 (patch) | |
tree | abee8c829e9cac8fae858eaf3a1613b0eb3eeda4 | |
parent | b6e2e4dcac3fd2f45d3560ca68fe823d86cb5b50 (diff) |
Carpet: Restore output precision after TimerNode output
-rw-r--r-- | Carpet/Carpet/src/TimerNode.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Carpet/Carpet/src/TimerNode.cc b/Carpet/Carpet/src/TimerNode.cc index 326a84d05..f339bce45 100644 --- a/Carpet/Carpet/src/TimerNode.cc +++ b/Carpet/Carpet/src/TimerNode.cc @@ -172,6 +172,8 @@ namespace Carpet { const int pcw = 6; const int tw = 8; + const streamsize oldprecision = out.precision(); + const ios_base::fmtflags oldflags = out.flags(); // Print this timer value out << fixed << setw(pcw) << setprecision(1) << 100.0 * t / total << "%" @@ -205,6 +207,8 @@ namespace Carpet { << " | " << space << "untimed" << endl; } } + out.precision (oldprecision); + out.setf (oldflags); } /// Print this node and its children as an XML file |