From: Daniel Arndt Date: Tue, 26 Jun 2018 00:34:38 +0000 (+0200) Subject: Fix more -Wrange-loop-analysis findings X-Git-Tag: v9.1.0-rc1~973^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10fe075f4354a34e50babd95e93d4376074c1060;p=dealii.git Fix more -Wrange-loop-analysis findings --- diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index 42dd03323e..68a7cad4a9 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -691,7 +691,7 @@ public: * Dereferencing operator. The returned value is the index of the element * inside the IndexSet. */ - size_type operator*() const; + const size_type &operator*() const; /** * Does this iterator point to an existing element? @@ -1283,7 +1283,7 @@ IndexSet::ElementIterator::is_valid() const -inline IndexSet::size_type IndexSet::ElementIterator::operator*() const +inline const IndexSet::size_type &IndexSet::ElementIterator::operator*() const { Assert( is_valid(), diff --git a/source/numerics/error_estimator_1d.cc b/source/numerics/error_estimator_1d.cc index f4aad3e062..8c670368be 100644 --- a/source/numerics/error_estimator_1d.cc +++ b/source/numerics/error_estimator_1d.cc @@ -348,7 +348,7 @@ KellyErrorEstimator<1, spacedim>::estimate( "indicator for internal boundaries in your boundary " "value map.")); - for (const auto boundary_function : neumann_bc) + for (const auto &boundary_function : neumann_bc) { (void)boundary_function; Assert(boundary_function.second->n_components == n_components,