From a0e3e2f25c6cb20c071a5c163e2055925fb227db Mon Sep 17 00:00:00 2001 From: bangerth Date: Sun, 17 Jun 2012 18:51:41 +0000 Subject: [PATCH] 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 --- deal.II/include/deal.II/base/data_out_base.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- 2.39.5