From 10fe075f4354a34e50babd95e93d4376074c1060 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 26 Jun 2018 02:34:38 +0200 Subject: [PATCH] Fix more -Wrange-loop-analysis findings --- include/deal.II/base/index_set.h | 4 ++-- source/numerics/error_estimator_1d.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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, -- 2.39.5