]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid C-style workaround in DataOutBase 9085/head
authorDaniel Arndt <arndtd@ornl.gov>
Sat, 23 Nov 2019 20:18:58 +0000 (15:18 -0500)
committerDaniel Arndt <arndtd@ornl.gov>
Sat, 23 Nov 2019 20:18:58 +0000 (15:18 -0500)
include/deal.II/base/data_out_base.h

index 324721d10c574f7a959e0100ab3f00fc8b23089f..e17f86261b25f34b0702770b0635cc6ae8a7ec71 100644 (file)
@@ -269,10 +269,9 @@ namespace DataOutBase
     /**
      * Patch indices of neighbors of the current patch. This is made available
      * for the OpenDX format that requires neighbor
-     * information for advanced output. For dim==0 we still allow one
-     * neighbor, to avoid compiler warnings about zero-sized arrays.
+     * information for advanced output.
      */
-    unsigned int neighbors[dim > 0 ? GeometryInfo<dim>::faces_per_cell : 1];
+    std::array<unsigned int, GeometryInfo<dim>::faces_per_cell> neighbors;
 
     /**
      * Number of this patch. Since we are not sure patches are always

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.