From ba060ea8eec2ed9d10c34c466966bd6ddfa285e9 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Fri, 18 Jan 2013 16:57:31 -0500 Subject: CarpetIOBasic: Simplify code and avoid compiler warnings --- Carpet/CarpetIOBasic/src/iobasic.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'Carpet/CarpetIOBasic') diff --git a/Carpet/CarpetIOBasic/src/iobasic.cc b/Carpet/CarpetIOBasic/src/iobasic.cc index 11c620604..acc850c4e 100644 --- a/Carpet/CarpetIOBasic/src/iobasic.cc +++ b/Carpet/CarpetIOBasic/src/iobasic.cc @@ -188,12 +188,8 @@ namespace CarpetIOBasic { if (TimeToOutput (cctkGH)) { - int oldprec; - ios_base::fmtflags oldflags; - if (CCTK_MyProc(cctkGH) == 0) { - oldprec = cout.precision(); - oldflags = cout.flags(); - } + int const oldprec = cout.precision(); + ios_base::fmtflags const oldflags = cout.flags(); if (output_count ++ % outHeader_every == 0 && outHeader_every != -1) { // Print the header @@ -225,10 +221,8 @@ namespace CarpetIOBasic { last_output = cctk_iteration; - if (CCTK_MyProc(cctkGH) == 0) { - cout.precision (oldprec); - cout.setf (oldflags); - } + cout.precision (oldprec); + cout.setf (oldflags); } // if time to output -- cgit v1.2.3