]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix more -Wrange-loop-analysis findings
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 26 Jun 2018 00:34:38 +0000 (02:34 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Thu, 28 Jun 2018 07:48:36 +0000 (09:48 +0200)
include/deal.II/base/index_set.h
source/numerics/error_estimator_1d.cc

index 42dd03323e3b3281df989fefefc3b1aa94eddf6a..68a7cad4a9885bdd92218633b1d2778603c5c8ad 100644 (file)
@@ -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(),
index f4aad3e0629a502ed6316e3783ad06520b2951d3..8c670368be49fe20c3bdb0f5e360385b6e50532f 100644 (file)
@@ -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,

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.