]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a problem with a zero-length array when dim==0. MSVC complains
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 17 Jun 2012 18:51:41 +0000 (18:51 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Sun, 17 Jun 2012 18:51:41 +0000 (18:51 +0000)
about that. (Patch by Bob Goodwin.)

git-svn-id: https://svn.dealii.org/trunk@25633 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/include/deal.II/base/data_out_base.h

index 0c732bd7f7cc2ac0efefcfab81f58c4f134c2865..d126f615aa70fb2e020193f1dbd58b925f851b6f 100644 (file)
@@ -284,7 +284,11 @@ class DataOutBase
                                           * into neighborship of
                                           * sub-grid cells.
                                           */
-        unsigned int neighbors[GeometryInfo<dim>::faces_per_cell];
+        unsigned int neighbors[dim > 0
+                              ?
+                              GeometryInfo<dim>::faces_per_cell
+                              :
+                              1];
 
                                          /**
                                           * Number of this

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.