From: David Wells Date: Sat, 18 Aug 2018 23:39:11 +0000 (-0400) Subject: Convert an internal function into a lambda. X-Git-Tag: v9.1.0-rc1~795^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff08ad1c5288205b732bcab4b5220e96ca33fa5b;p=dealii.git Convert an internal function into a lambda. --- diff --git a/include/deal.II/lac/affine_constraints.h b/include/deal.II/lac/affine_constraints.h index b025fe77bb..a2fbfd011f 100644 --- a/include/deal.II/lac/affine_constraints.h +++ b/include/deal.II/lac/affine_constraints.h @@ -1477,13 +1477,6 @@ private: size_type calculate_line_index(const size_type line) const; - /** - * Return @p true if the weight of an entry (the second element of the pair) - * equals zero. This function is used to delete entries with zero weight. - */ - static bool - check_zero_weight(const std::pair &p); - /** * This function actually implements the local_to_global function for * standard (non-block) matrices. diff --git a/include/deal.II/lac/affine_constraints.templates.h b/include/deal.II/lac/affine_constraints.templates.h index da6d16b056..a349693976 100644 --- a/include/deal.II/lac/affine_constraints.templates.h +++ b/include/deal.II/lac/affine_constraints.templates.h @@ -71,16 +71,6 @@ AffineConstraints::copy_from(const AffineConstraints &other) -template -bool -AffineConstraints::check_zero_weight( - const std::pair &p) -{ - return (p.second == number(0.)); -} - - - template bool AffineConstraints::ConstraintLine:: @@ -343,7 +333,10 @@ AffineConstraints::close() // appears. obviously, 0*something can be omitted line.entries.erase(std::remove_if(line.entries.begin(), line.entries.end(), - &check_zero_weight), + []( + const std::pair &p) { + return p.second == number(0.); + }), line.entries.end());