From d2c5358df89c491c81a9da4d0dc5d316b1715e17 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Tue, 20 Jun 2023 17:19:47 -0400 Subject: [PATCH] Use a reference to a const value in one place --- include/deal.II/base/index_set.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 -- 2.39.5