From: Wolfgang Bangerth Date: Wed, 8 Jan 2020 16:37:55 +0000 (-0700) Subject: Move some code. X-Git-Tag: v9.2.0-rc1~714^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9265%2Fhead;p=dealii.git Move some code. The previous code was right but unnecessarily hard to read. A block of code could only be executed if an 'if' condition was true but wasn't actually under the condition. Shift things. --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 57248a476b..58524e067c 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -5229,15 +5229,17 @@ namespace DataOutBase ((flags.cycle != std::numeric_limits::min() ? 1 : 0) + (flags.time != std::numeric_limits::min() ? 1 : 0)); if (n_metadata > 0) - out << "FIELD FieldData " << n_metadata << "\n"; - - if (flags.cycle != std::numeric_limits::min()) - { - out << "CYCLE 1 1 int\n" << flags.cycle << "\n"; - } - if (flags.time != std::numeric_limits::min()) { - out << "TIME 1 1 double\n" << flags.time << "\n"; + out << "FIELD FieldData " << n_metadata << "\n"; + + if (flags.cycle != std::numeric_limits::min()) + { + out << "CYCLE 1 1 int\n" << flags.cycle << "\n"; + } + if (flags.time != std::numeric_limits::min()) + { + out << "TIME 1 1 double\n" << flags.time << "\n"; + } } }