]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
changed vtk_cell_type dimension to 5, to allow dim=4 instantiation, as supposed by...
authorkoecher <koecher@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Jul 2013 19:51:11 +0000 (19:51 +0000)
committerkoecher <koecher@0785d39b-7218-0410-832d-ea1e28bc413d>
Wed, 17 Jul 2013 19:51:11 +0000 (19:51 +0000)
git-svn-id: https://svn.dealii.org/trunk@30025 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/source/base/data_out_base.cc

index 6e414d7e1f896beb3c55bd3d5d02c41b97a9fd43..17cd9b2e04227e4f909882614dfbfb0387d8d2f5 100644 (file)
@@ -300,9 +300,13 @@ namespace
   };
 #endif
 
-  static unsigned int vtk_cell_type[4] =
+  // NOTE: (UK) The dimension of the array is choosen to 5 to allow the choice
+  // DataOutBase<deal_II_dimension,deal_II_dimension+1> in general
+  // Wolfgang supposed that we don't need it in general, but however this
+  // choice avoids a -Warray-bounds check warning
+  static unsigned int vtk_cell_type[5] =
   {
-    0, 3, 9, 12
+    0, 3, 9, 12, static_cast<unsigned int>(-1)
   };
 
 //----------------------------------------------------------------------//

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.