From 278e3df7f4b3693b7a917e66deb08d97d9c5aa21 Mon Sep 17 00:00:00 2001 From: Martin Kronbichler Date: Thu, 19 Sep 2019 18:41:19 +0200 Subject: [PATCH] Add comment about an if --- include/deal.II/base/index_set.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/deal.II/base/index_set.h b/include/deal.II/base/index_set.h index f4e6dfe24a..ef6a55d575 100644 --- a/include/deal.II/base/index_set.h +++ b/include/deal.II/base/index_set.h @@ -1693,6 +1693,11 @@ IndexSet::add_indices(const ForwardIterator &begin, const ForwardIterator &end) tmp_ranges.emplace_back(begin_index, end_index); p = q; + + // if the starting index of the next go-around of the for loop is less + // than the end index of the one just identified, then we will have at + // least one pair of ranges that are not sorted, and consequently the + // whole collection of ranges is not sorted. if (p != end && *p < end_index) ranges_are_sorted = false; } -- 2.39.5