From: bangerth Date: Sun, 17 Jun 2012 18:51:41 +0000 (+0000) Subject: Work around a problem with a zero-length array when dim==0. MSVC complains X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0e3e2f25c6cb20c071a5c163e2055925fb227db;p=dealii-svn.git Work around a problem with a zero-length array when dim==0. MSVC complains about that. (Patch by Bob Goodwin.) git-svn-id: https://svn.dealii.org/trunk@25633 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/include/deal.II/base/data_out_base.h b/deal.II/include/deal.II/base/data_out_base.h index 0c732bd7f7..d126f615aa 100644 --- a/deal.II/include/deal.II/base/data_out_base.h +++ b/deal.II/include/deal.II/base/data_out_base.h @@ -284,7 +284,11 @@ class DataOutBase * into neighborship of * sub-grid cells. */ - unsigned int neighbors[GeometryInfo::faces_per_cell]; + unsigned int neighbors[dim > 0 + ? + GeometryInfo::faces_per_cell + : + 1]; /** * Number of this