Skip to content
Snippets Groups Projects
Commit ea2e3a3f authored by Max Kahnt's avatar Max Kahnt
Browse files

Use auto for iterator type deduction.

parent cc553093
No related branches found
No related tags found
1 merge request!17Cleanup/norms
......@@ -33,8 +33,8 @@ public:
for (size_t i=0; i<matrix_->N(); i++)
{
typename Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> >::row_type::const_iterator cIt = (*matrix_)[i].begin();
typename Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> >::row_type::const_iterator cEndIt = (*matrix_)[i].end();
auto cIt = (*matrix_)[i].begin();
auto cEndIt = (*matrix_)[i].end();
typename VectorType::block_type differ_i = u1[i] - u2[i];
for (; cIt!=cEndIt; ++cIt)
......@@ -58,8 +58,8 @@ public:
for (size_t i=0; i<matrix_->N(); i++) {
typename Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> >::row_type::const_iterator cIt = (*matrix_)[i].begin();
typename Dune::BCRSMatrix<Dune::FieldMatrix<double,1,1> >::row_type::const_iterator cEndIt = (*matrix_)[i].end();
auto cIt = (*matrix_)[i].begin();
auto cEndIt = (*matrix_)[i].end();
for (; cIt!=cEndIt; ++cIt)
sum += u[i]*u[cIt.index()] * (*cIt);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment