From cb09939b184ba6bdb7f48cc54b9ee1f9d98d73da Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sat, 30 Mar 2019 08:57:31 -0600 Subject: [PATCH] Use a range-based for loop. --- source/hp/dof_handler.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/hp/dof_handler.cc b/source/hp/dof_handler.cc index 307dd60151..6bfa72ddee 100644 --- a/source/hp/dof_handler.cc +++ b/source/hp/dof_handler.cc @@ -1222,8 +1222,8 @@ namespace hp { // unsubscribe as a listener to refinement of the underlying // triangulation - for (unsigned int i = 0; i < tria_listeners.size(); ++i) - tria_listeners[i].disconnect(); + for (auto &connection : tria_listeners) + connection.disconnect(); tria_listeners.clear(); // ...and release allocated memory @@ -1514,8 +1514,8 @@ namespace hp { if (this->tria != &tria) { - for (unsigned int i = 0; i < tria_listeners.size(); ++i) - tria_listeners[i].disconnect(); + for (auto &connection : tria_listeners) + connection.disconnect(); tria_listeners.clear(); this->tria = &tria; -- 2.39.5