diff --git a/dune/tectonic/myblockproblem.hh b/dune/tectonic/myblockproblem.hh
index c9eeb15b089b4367818111887dca171ebd81f3c1..0a0864b5ec8b352de3bee5d34171b513ed32f1f5 100644
--- a/dune/tectonic/myblockproblem.hh
+++ b/dune/tectonic/myblockproblem.hh
@@ -171,9 +171,8 @@ template <class MyConvexProblemTypeTEMPLATE> class MyBlockProblem {
 
     // compute quadratic part of hessian (linearization.A += problem.A)
     for (size_t i = 0; i < problem.A.N(); ++i) {
-      typename MatrixType::row_type::ConstIterator it = problem.A[i].begin();
-      typename MatrixType::row_type::ConstIterator end = problem.A[i].end();
-      for (; it != end; ++it)
+      auto const end = problem.A[i].end();
+      for (auto it = problem.A[i].begin(); it != end; ++it)
         Arithmetic::addProduct(linearization.A[i][it.index()], 1.0, *it);
     }
 
@@ -310,9 +309,8 @@ class MyBlockProblem<MyConvexProblemTypeTEMPLATE>::IterateObject {
       LocalMatrixType const *localA = nullptr;
       LocalVectorType localb(problem.f[m]);
 
-      typename MatrixType::row_type::ConstIterator it;
-      typename MatrixType::row_type::ConstIterator end = problem.A[m].end();
-      for (it = problem.A[m].begin(); it != end; ++it) {
+      auto const end = problem.A[m].end();
+      for (auto it = problem.A[m].begin(); it != end; ++it) {
         int const j = it.index();
         if (j == m)
           localA = &(*it); // localA = A[m][m]
diff --git a/src/one-body-sample.cc b/src/one-body-sample.cc
index 61fe76a2e1db822512f0cc56d947b156978a4ee8..cd87e2243ce60683d59b098e4696b7fb21468562 100644
--- a/src/one-body-sample.cc
+++ b/src/one-body-sample.cc
@@ -87,7 +87,7 @@ void setup_boundary(GridView const &gridView,
   size_t dirichlet_nodes = 0;
   size_t neumann_nodes = 0;
   size_t frictional_nodes = 0;
-  for (VertexLeafIterator it = gridView.template begin<dim>();
+  for (auto it = gridView.template begin<dim>();
        it != gridView.template end<dim>(); ++it) {
     assert(it->geometry().corners() == 1);
     Dune::FieldVector<double, dim> const coordinates = it->geometry().corner(0);