From 0c068cb69ed2b0d7d9c09965ee231fbec5a36a04 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Tue, 22 Dec 2015 09:45:58 -0600 Subject: [PATCH] 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. --- source/grid/grid_tools.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } } -- 2.39.5