]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Silence a warning.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 29 Jan 2024 18:49:42 +0000 (11:49 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 29 Jan 2024 18:49:42 +0000 (11:49 -0700)
include/deal.II/cgal/utilities.h

index 337eb3a09dc1c15498151e692632f97cdda88d31..08524f757871a18fc7d0be7b9d0761b3e4543fcd 100644 (file)
@@ -610,9 +610,10 @@ namespace CGALWrappers
   resort_dealii_vertices_to_cgal_order(const unsigned int            structdim,
                                        std::vector<Point<spacedim>> &vertices)
   {
-    if (ReferenceCell::n_vertices_to_type(structdim, vertices.size()) ==
-        ReferenceCells::Quadrilateral)
-      std::swap(vertices[2], vertices[3]);
+    if constexpr (spacedim == 2)
+      if (ReferenceCell::n_vertices_to_type(structdim, vertices.size()) ==
+          ReferenceCells::Quadrilateral)
+        std::swap(vertices[2], vertices[3]);
   }
 
 

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.