From: Wolfgang Bangerth Date: Sat, 30 Mar 2019 14:57:31 +0000 (-0600) Subject: Use a range-based for loop. X-Git-Tag: v9.1.0-rc1~229^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F7878%2Fhead;p=dealii.git Use a range-based for loop. --- 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;