From: Wolfgang Bangerth Date: Tue, 8 Nov 2016 02:16:10 +0000 (-0700) Subject: Remove some dead code. X-Git-Tag: v8.5.0-rc1~429^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6a810fa96915ea831c38f0917b1817f2f30580f;p=dealii.git 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. --- 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,