From: Daniel Arndt Date: Tue, 20 Jun 2023 21:19:47 +0000 (-0400) Subject: Use a reference to a const value in one place X-Git-Tag: relicensing~757^2~3 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d2c5358df89c491c81a9da4d0dc5d316b1715e17;p=dealii.git Use a reference to a const value in one place --- diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index c9abbddc7a..7e803b8ec3 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -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