From: Wolfgang Bangerth Date: Thu, 6 Jul 2023 15:48:16 +0000 (-0600) Subject: Make an argument a const reference. X-Git-Tag: relicensing~729^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F15666%2Fhead;p=dealii.git Make an argument a const reference. --- diff --git a/include/deal.II/lac/la_parallel_vector.h b/include/deal.II/lac/la_parallel_vector.h index 6b117fd4a7..02a569d907 100644 --- a/include/deal.II/lac/la_parallel_vector.h +++ b/include/deal.II/lac/la_parallel_vector.h @@ -750,9 +750,9 @@ namespace LinearAlgebra void import_elements( const LinearAlgebra::ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern = {}); + const VectorOperation::values operation, + const std::shared_ptr + &communication_pattern = {}); /** * @deprecated Use import_elements() instead. diff --git a/include/deal.II/lac/la_parallel_vector.templates.h b/include/deal.II/lac/la_parallel_vector.templates.h index 84bbd3b1f3..8be03ade57 100644 --- a/include/deal.II/lac/la_parallel_vector.templates.h +++ b/include/deal.II/lac/la_parallel_vector.templates.h @@ -912,7 +912,7 @@ namespace LinearAlgebra void Vector::import_elements( const Vector &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::import_elements( const ReadWriteVector &V, - VectorOperation::values operation, - std::shared_ptr - communication_pattern) + const VectorOperation::values operation, + const std::shared_ptr + &communication_pattern) { // If no communication pattern is given, create one. Otherwise, use the // given one.