From a6a810fa96915ea831c38f0917b1817f2f30580f Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 7 Nov 2016 19:16:10 -0700 Subject: [PATCH] Remove some dead code. As the assertion at the top of the patch shows, 'starting_indices' must only have values between 0 and N (=sparsity.n_rows()). Consequently, the loop that replaces out-of-bounds values with numbers::invalid_size_type should never trigger. Further, the 'remove_if' will also never do anything, and the fact that we accidentally not actually do anything with its return value (as one should for 'remove_if') doesn't matter. --- source/lac/sparsity_tools.cc | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/source/lac/sparsity_tools.cc b/source/lac/sparsity_tools.cc index 2494eba0e7..850e3501d1 100644 --- a/source/lac/sparsity_tools.cc +++ b/source/lac/sparsity_tools.cc @@ -209,7 +209,9 @@ namespace SparsityTools ExcMessage("Only valid for sparsity patterns which store all rows.")); for (SparsityPattern::size_type i=0; i=sparsity.n_rows())) - last_round_dofs[i] = numbers::invalid_size_type; - - std::remove_if (last_round_dofs.begin(), last_round_dofs.end(), - std_cxx11::bind(std::equal_to(), - std_cxx11::_1, - numbers::invalid_size_type)); - - // now if no valid points remain: find dof with lowest coordination number + // if no starting indices were given: find dof with lowest coordination number if (last_round_dofs.empty()) last_round_dofs .push_back (internal::find_unnumbered_starting_index (sparsity, -- 2.39.5