From: Doug Shi-Dong Date: Fri, 1 May 2020 03:32:53 +0000 (-0400) Subject: Pass arg by value in create_ascending_partitioning X-Git-Tag: v9.2.0-rc1~133^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfd9ef6265f77e7ad886f97d6497fbe2660666f0;p=dealii.git Pass arg by value in create_ascending_partitioning As per https://github.com/dealii/dealii/pull/9991#issuecomment-622199929. --- diff --git a/include/deal.II/base/mpi.h b/include/deal.II/base/mpi.h index 589260d15c..68bdb8e12b 100644 --- a/include/deal.II/base/mpi.h +++ b/include/deal.II/base/mpi.h @@ -428,8 +428,8 @@ namespace Utilities * process p. */ std::vector - create_ascending_partitioning(const MPI_Comm & comm, - const IndexSet::size_type &local_size); + create_ascending_partitioning(const MPI_Comm & comm, + const IndexSet::size_type local_size); #ifdef DEAL_II_WITH_MPI /** diff --git a/source/base/mpi.cc b/source/base/mpi.cc index f8cddf8b7f..9295a2c0c8 100644 --- a/source/base/mpi.cc +++ b/source/base/mpi.cc @@ -222,8 +222,8 @@ namespace Utilities std::vector - create_ascending_partitioning(const MPI_Comm & comm, - const IndexSet::size_type &local_size) + create_ascending_partitioning(const MPI_Comm & comm, + const IndexSet::size_type local_size) { const unsigned int n_proc = n_mpi_processes(comm); const std::vector sizes = @@ -659,7 +659,7 @@ namespace Utilities std::vector create_ascending_partitioning(const MPI_Comm & /*comm*/, - const IndexSet::size_type &local_size) + const IndexSet::size_type local_size) { return std::vector(1, complete_index_set(local_size)); }