From: Marc Fehling Date: Fri, 6 Sep 2024 08:50:41 +0000 (+0200) Subject: Fix performance-noexcept-swap. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35e83e2863723216aa102672f832ece05a1da6b3;p=dealii.git Fix performance-noexcept-swap. --- diff --git a/include/deal.II/lac/petsc_block_vector.h b/include/deal.II/lac/petsc_block_vector.h index eda42f8f7e..067cb79a80 100644 --- a/include/deal.II/lac/petsc_block_vector.h +++ b/include/deal.II/lac/petsc_block_vector.h @@ -340,7 +340,7 @@ namespace PETScWrappers * functions. */ void - swap(BlockVector &v); + swap(BlockVector &v) noexcept; /** * Print to a stream. @@ -629,7 +629,7 @@ namespace PETScWrappers inline void - BlockVector::swap(BlockVector &v) + BlockVector::swap(BlockVector &v) noexcept { std::swap(this->components, v.components); std::swap(this->petsc_nest_vector, v.petsc_nest_vector); @@ -665,7 +665,7 @@ namespace PETScWrappers * @relatesalso PETScWrappers::MPI::BlockVector */ inline void - swap(BlockVector &u, BlockVector &v) + swap(BlockVector &u, BlockVector &v) noexcept { u.swap(v); } diff --git a/include/deal.II/lac/petsc_vector.h b/include/deal.II/lac/petsc_vector.h index d2747a0754..6974d44a67 100644 --- a/include/deal.II/lac/petsc_vector.h +++ b/include/deal.II/lac/petsc_vector.h @@ -446,7 +446,7 @@ namespace PETScWrappers * @relatesalso PETScWrappers::MPI::Vector */ inline void - swap(Vector &u, Vector &v) + swap(Vector &u, Vector &v) noexcept { u.swap(v); }