]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make a template argument easier to read. 11083/head
authorDavid Wells <drwells@email.unc.edu>
Thu, 22 Oct 2020 14:36:54 +0000 (10:36 -0400)
committerDavid Wells <drwells@email.unc.edu>
Thu, 22 Oct 2020 14:36:54 +0000 (10:36 -0400)
clang-format gets confused here - lets just explicitly use a variable.

source/grid/grid_out.cc

index 16e1a7f5e8f73b3449ce7c7e093feade75e515ee..2a6aa1cc8ec73a20300d79da78a62e864bcf751d 100644 (file)
@@ -3223,14 +3223,13 @@ GridOut::write_vtk(const Triangulation<dim, spacedim> &tria,
     for (const auto &face : faces)
       {
         out << face->n_vertices();
+        constexpr int face_dim = dim > 1 ? dim - 1 : 1;
         for (const unsigned int i : face->vertex_indices())
           {
             out << ' '
                 << face->vertex_index(GeometryInfo<dim>::vertices_per_face ==
                                           face->n_vertices() ?
-                                        GeometryInfo < (dim > 1) ?
-                                        dim - 1 :
-                                        dim > ::ucd_to_deal[i] :
+                                        GeometryInfo<face_dim>::ucd_to_deal[i] :
                                         i);
           }
         out << '\n';

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.