From 20eccaedfcd8d7a9f29ece438b50637c9c212870 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 8 Jan 2020 09:37:55 -0700 Subject: [PATCH] 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. --- source/base/data_out_base.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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"; + } } } -- 2.39.5