From b87bb5b03571b5c11c646286af8e3d0bb976a717 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 30 Dec 2022 15:25:30 -0700 Subject: [PATCH] Move the update of a variable out of if-else branches. --- source/base/data_out_base.cc | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 9a460e5198..c14c91179d 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -6070,11 +6070,6 @@ namespace DataOutBase default: Assert(false, ExcNotImplemented()); } - - // Finally update the number of the first vertex of this - // patch - first_vertex_of_patch += - Utilities::fixed_power(n_subdivisions + 1); } else // use higher-order output { @@ -6174,11 +6169,12 @@ namespace DataOutBase o << '\t' << first_vertex_of_patch + c; o << '\n'; } - - // Finally update the number of the first vertex of this - // patch - first_vertex_of_patch += Utilities::fixed_power(n); } + + // Finally update the number of the first vertex of this + // patch + first_vertex_of_patch += + Utilities::fixed_power(patch.n_subdivisions + 1); } } -- 2.39.5