Skip to content

Commit

Permalink
Make an argument a const reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
bangerth committed Jul 6, 2023
1 parent 000659f commit 89e80b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions include/deal.II/lac/la_parallel_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
8 changes: 4 additions & 4 deletions include/deal.II/lac/la_parallel_vector.templates.h
Original file line number Diff line number Diff line change
Expand Up @@ -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() ==
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 89e80b9

Please sign in to comment.