]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Simplify cast to signed boundary_id
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 29 Nov 2018 08:58:46 +0000 (09:58 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 29 Nov 2018 08:58:46 +0000 (09:58 +0100)
source/grid/grid_out.cc

index 1b13dc9b7a4cb6d459790f3c2da7f71abc1d7b25..770fe4de71f329918af902618d5330edefe1e251 100644 (file)
@@ -947,13 +947,9 @@ GridOut::write_dx(const Triangulation<dim, spacedim> &tria,
           // Little trick to get -1 for the interior
           for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
             {
-              const types::boundary_id boundary_id =
-                cell->face(f)->boundary_id();
               out << ' '
-                  << (boundary_id == static_cast<types::boundary_id>(-1) ?
-                        -1 :
-                        static_cast<std::make_signed<types::boundary_id>::type>(
-                          boundary_id));
+                  << static_cast<std::make_signed<types::boundary_id>::type>(
+                       cell->face(f)->boundary_id());
             }
           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.