From ea6ca7e7c282e5a930acf375361244132f107c13 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Mon, 23 Oct 2023 06:53:44 -0600 Subject: [PATCH] Move objects into place rather than swapping them. --- source/fe/fe_system.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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); } } -- 2.39.5