From: Marc Fehling Date: Tue, 11 Feb 2020 19:23:34 +0000 (+0100) Subject: parallel::CellWeights: Capture values, not references. X-Git-Tag: v9.2.0-rc1~534^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd1dd956153c9623c6713f0a26bf4b6403a65a99;p=dealii.git parallel::CellWeights: Capture values, not references. --- diff --git a/source/distributed/cell_weights.cc b/source/distributed/cell_weights.cc index 9f78643207..2980844f31 100644 --- a/source/distributed/cell_weights.cc +++ b/source/distributed/cell_weights.cc @@ -79,7 +79,7 @@ namespace parallel CellWeights::ndofs_weighting( const std::pair &coefficients) { - return [&coefficients]( + return [coefficients]( const typename hp::DoFHandler::cell_iterator &, const FiniteElement &future_fe) -> unsigned int { const float result = @@ -101,7 +101,7 @@ namespace parallel CellWeights::ndofs_weighting( const std::vector> &coefficients) { - return [&coefficients]( + return [coefficients]( const typename hp::DoFHandler::cell_iterator &, const FiniteElement &future_fe) -> unsigned int { float result = 0; @@ -139,7 +139,7 @@ namespace parallel ExcMessage( "parallel::CellWeights requires a parallel::TriangulationBase object.")); - return [&dof_handler, tria, &weighting_function]( + return [&dof_handler, tria, weighting_function]( const typename Triangulation::cell_iterator &cell, const typename Triangulation::CellStatus status) -> unsigned int {