]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make an argument a const reference. 15666/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 6 Jul 2023 15:48:16 +0000 (09:48 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Fri, 7 Jul 2023 05:16:01 +0000 (23:16 -0600)
include/deal.II/lac/la_parallel_vector.h
include/deal.II/lac/la_parallel_vector.templates.h

index 6b117fd4a74e7691a9fdb1724878ef51c1f141ea..02a569d907016c6b31646658be1f27a59702631a 100644 (file)
@@ -750,9 +750,9 @@ namespace LinearAlgebra
       void
       import_elements(
         const LinearAlgebra::ReadWriteVector<Number> &V,
-        VectorOperation::values                       operation,
-        std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-          communication_pattern = {});
+        const VectorOperation::values                 operation,
+        const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+          &communication_pattern = {});
 
       /**
        * @deprecated Use import_elements() instead.
index 84bbd3b1f3f49d634f8bd3194657966374722ec9..8be03ade57c31beb9dc04999e06b249c9a733000 100644 (file)
@@ -912,7 +912,7 @@ namespace LinearAlgebra
     void
     Vector<Number, MemorySpaceType>::import_elements(
       const Vector<Number, MemorySpaceType2> &src,
-      VectorOperation::values                 operation)
+      const VectorOperation::values           operation)
     {
       Assert(src.partitioner.get() != nullptr, ExcNotInitialized());
       Assert(partitioner->locally_owned_range() ==
@@ -1253,9 +1253,9 @@ namespace LinearAlgebra
     void
     Vector<Number, MemorySpaceType>::import_elements(
       const ReadWriteVector<Number> &V,
-      VectorOperation::values        operation,
-      std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
-        communication_pattern)
+      const VectorOperation::values  operation,
+      const std::shared_ptr<const Utilities::MPI::CommunicationPatternBase>
+        &communication_pattern)
     {
       // If no communication pattern is given, create one. Otherwise, use the
       // given one.

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.