]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use a reference argument for std::shared_ptr.
authorWolfgang Bangerth <bangerth@colostate.edu>
Mon, 3 Jul 2023 23:48:30 +0000 (17:48 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Mon, 3 Jul 2023 23:52:06 +0000 (17:52 -0600)
include/deal.II/lac/trilinos_epetra_vector.h
source/lac/trilinos_epetra_vector.cc

index e131be901966da207eb2159c880dfae021235096..e65d0ca6f66fe8ec7367ec56fd3ac3b5394785de 100644 (file)
@@ -139,8 +139,8 @@ namespace LinearAlgebra
       import_elements(
         const ReadWriteVector<double> &V,
         VectorOperation::values        operation,
-        std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-          communication_pattern = {});
+        const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+          &communication_pattern = {});
 
       /**
        * @deprecated Use import_elements() instead.
index 4cc1411abd669ca12910a5ab9efcdaf409aab088..2292e7ea766a3647825eb14a912f67348a273335 100644 (file)
@@ -159,8 +159,8 @@ namespace LinearAlgebra
     Vector::import_elements(
       const ReadWriteVector<double> &V,
       VectorOperation::values        operation,
-      std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-        communication_pattern)
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern)
     {
       // If no communication pattern is given, create one. Otherwise, use the
       // one given.

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.