]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a reference to a const value in one place
authorDaniel Arndt <arndtd@ornl.gov>
Tue, 20 Jun 2023 21:19:47 +0000 (17:19 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Mon, 3 Jul 2023 20:55:57 +0000 (16:55 -0400)
include/deal.II/base/index_set.h

index c9abbddc7a6f489622596b988cf93c7ef1f21dd9..7e803b8ec31e9692d130b8d8a005d504662a3574 100644 (file)
@@ -1831,8 +1831,8 @@ IndexSet::n_elements() const
   size_type v = 0;
   if (!ranges.empty())
     {
-      Range &r = ranges.back();
-      v        = r.nth_index_in_set + r.end - r.begin;
+      const Range &r = ranges.back();
+      v              = r.nth_index_in_set + r.end - r.begin;
     }
 
 #ifdef DEBUG

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.