From: Wolfgang Bangerth Date: Mon, 23 Oct 2023 12:53:44 +0000 (-0600) Subject: Move objects into place rather than swapping them. X-Git-Tag: relicensing~366^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea6ca7e7c282e5a930acf375361244132f107c13;p=dealii.git Move objects into place rather than swapping them. --- diff --git a/source/fe/fe_system.cc b/source/fe/fe_system.cc index 5759b45936..aca2256c40 100644 --- a/source/fe/fe_system.cc +++ b/source/fe/fe_system.cc @@ -963,8 +963,9 @@ FESystem::get_restriction_matrix( (*base_matrices[base])(base_index_i, base_index_j); } - restriction.swap(const_cast &>( - this->restriction[refinement_case - 1][child])); + const_cast &>( + this->restriction[refinement_case - 1][child]) = + std::move(restriction); } } @@ -1030,8 +1031,10 @@ FESystem::get_prolongation_matrix( prolongate(i, j) = (*base_matrices[base])(base_index_i, base_index_j); } - prolongate.swap(const_cast &>( - this->prolongation[refinement_case - 1][child])); + + const_cast &>( + this->prolongation[refinement_case - 1][child]) = + std::move(prolongate); } }