From 286f4e9c4a6f96a9ae6c6afafb1dfa52481abbed Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 19 Sep 2018 14:02:42 -0500 Subject: [PATCH] step-7: Use const auto &cell instead of const auto cell --- examples/step-7/step-7.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/step-7/step-7.cc b/examples/step-7/step-7.cc index 38a9c11d94..570892df25 100644 --- a/examples/step-7/step-7.cc +++ b/examples/step-7/step-7.cc @@ -629,7 +629,7 @@ namespace Step7 // Now for the main loop over all cells. This is mostly unchanged from // previous examples, so we only comment on the things that have changed. - for (const auto cell : dof_handler.active_cell_iterators()) + for (const auto &cell : dof_handler.active_cell_iterators()) { cell_matrix = 0.; cell_rhs = 0.; @@ -997,7 +997,7 @@ namespace Step7 GridGenerator::hyper_cube(triangulation, -1, 1); triangulation.refine_global(3); - for (const auto cell : triangulation.cell_iterators()) + for (const auto &cell : triangulation.cell_iterators()) for (unsigned int face_number = 0; face_number < GeometryInfo::faces_per_cell; ++face_number) -- 2.39.5