From: Marc Fehling Date: Fri, 30 Nov 2018 12:01:44 +0000 (+0100) Subject: Use const refs on cell_iterators instead of copying them in hp::DoFHandler. X-Git-Tag: v9.1.0-rc1~518^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7490%2Fhead;p=dealii.git Use const refs on cell_iterators instead of copying them in hp::DoFHandler. --- diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 8d790c9a88..d304971601 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1839,7 +1839,7 @@ namespace hp // respective children. for (const auto &pair : refined_cells_fe_index) { - const cell_iterator parent(*(pair.first), this); + const cell_iterator &parent = pair.first; for (unsigned int child_index = 0; child_index < parent->n_children(); @@ -1859,7 +1859,7 @@ namespace hp // before the actual coarsening happened. for (const auto &pair : coarsened_cells_fe_index) { - const cell_iterator cell(*(pair.first), this); + const cell_iterator &cell = pair.first; if (cell->is_locally_owned()) {