]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix performance-noexcept-swap.
authorMarc Fehling <mafehling.git@gmail.com>
Fri, 6 Sep 2024 08:50:41 +0000 (10:50 +0200)
committerMarc Fehling <mafehling.git@gmail.com>
Fri, 6 Sep 2024 08:50:41 +0000 (10:50 +0200)
include/deal.II/lac/petsc_block_vector.h
include/deal.II/lac/petsc_vector.h

index eda42f8f7e33716a3397d139a42a1cd4f93385c8..067cb79a80ed8510ebc3718d42bcc0c5af666ccd 100644 (file)
@@ -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);
     }
index d2747a07547e355fed3462b7b97c60a693e988c6..6974d44a67c4eb1ee72195aafe5ee263f7cffa59 100644 (file)
@@ -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);
     }

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.