]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Move the update of a variable out of if-else branches.
authorWolfgang Bangerth <bangerth@colostate.edu>
Fri, 30 Dec 2022 22:25:30 +0000 (15:25 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 31 Dec 2022 15:25:43 +0000 (08:25 -0700)
source/base/data_out_base.cc

index 9a460e519844c928ba6fd258d1b70f24142efb76..c14c91179dd26ff0ee5468bc37cb90a006c8ed9a 100644 (file)
@@ -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<dim>(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<dim>(n);
                 }
+
+              // Finally update the number of the first vertex of this
+              // patch
+              first_vertex_of_patch +=
+                Utilities::fixed_power<dim>(patch.n_subdivisions + 1);
             }
         }
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.