From: Wolfgang Bangerth Date: Tue, 22 Dec 2015 15:45:58 +0000 (-0600) Subject: Fix a warning. X-Git-Tag: v8.4.0-rc2~137^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F2009%2Fhead;p=dealii.git Fix a warning. GeometryInfo::lines_per_face is zero in 1d and 2d, so the comparison e::lines_per_face is always false (as expected and intended) but the compiler warns about this. Work around this by using signed integers. --- diff --git a/source/grid/grid_tools.cc b/source/grid/grid_tools.cc index a9481555f8..7ddcb3b8c8 100644 --- a/source/grid/grid_tools.cc +++ b/source/grid/grid_tools.cc @@ -3268,7 +3268,7 @@ next_cell: cell != tria.end(); ++cell) for (unsigned int f=0; f::faces_per_cell; ++f) if (cell->face(f)->at_boundary()) - for (unsigned int e=0; e::lines_per_face; ++e) + for (signed int e=0; e(GeometryInfo::lines_per_face); ++e) cell->face(f)->line(e)->set_manifold_id (static_cast(cell->face(f)->line(e)->boundary_id())); @@ -3289,7 +3289,7 @@ next_cell: { cell->face(f)->set_boundary_id(0); if (dim >= 3) - for (unsigned int e=0; e::lines_per_face; ++e) + for (signed int e=0; e(GeometryInfo::lines_per_face); ++e) cell->face(f)->line(e)->set_boundary_id(0); } }