From 14316e028d5f9cce7f9af77a6f2b585d34eb4725 Mon Sep 17 00:00:00 2001
From: Marc Fehling <marc.fehling@gmx.net>
Date: Fri, 30 Nov 2018 13:01:44 +0100
Subject: [PATCH] Use const refs on cell_iterators instead of copying them in
 hp::DoFHandler.

---
 source/hp/dof_handler.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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())
               {
-- 
2.39.5