From 7e175481b1518e99228542104ffec9bf4aacaf44 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Wed, 22 Mar 2017 18:17:06 +0100 Subject: [PATCH] Refactor and fix IndexSet::is_ascending_ad_one_to_one --- source/base/index_set.cc | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/source/base/index_set.cc b/source/base/index_set.cc index 8066b9ec04..7e74c4964f 100644 --- a/source/base/index_set.cc +++ b/source/base/index_set.cc @@ -636,20 +636,23 @@ IndexSet::is_ascending_and_one_to_one (const MPI_Comm &communicator) const if (my_rank == 0) { // find out if the received std::vector is ascending - types::global_dof_index old_dof = global_dofs[0], new_dof = 0; + types::global_dof_index old_dof = global_dofs[0]; types::global_dof_index index = 0; while (global_dofs[index] == numbers::invalid_dof_index) ++index; old_dof = global_dofs[index++]; for (; index