Skip to content
Snippets Groups Projects
Commit 2c9dfcb3 authored by Sebastian Kehl's avatar Sebastian Kehl
Browse files

remove superfluous move-statements

These were superfluous and inhibiting copy elision.
parent b6b12519
No related branches found
No related tags found
1 merge request!143Remove superfluous move-statements.
Pipeline #259036 passed
...@@ -56,7 +56,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void) ...@@ -56,7 +56,7 @@ int NSVE_Stokes_particles<rnumber>::initialize(void)
tracers0_smoothness, // parameter tracers0_smoothness, // parameter
this->comm, this->comm,
this->fs->iteration+1, this->fs->iteration+1,
std::move(p2p_ghost_collisions<double, long long int>()), p2p_ghost_collisions<double, long long int>(),
std::move(current_particles_inner_computer), std::move(current_particles_inner_computer),
this->tracers0_cutoff); this->tracers0_cutoff);
//DEBUG_MSG_WAIT(MPI_COMM_WORLD, "after call to particles_system_builder\n"); //DEBUG_MSG_WAIT(MPI_COMM_WORLD, "after call to particles_system_builder\n");
......
...@@ -178,7 +178,7 @@ class particle_set_input: public abstract_particles_input<partsize_t, particle_r ...@@ -178,7 +178,7 @@ class particle_set_input: public abstract_particles_input<partsize_t, particle_r
std::vector<std::unique_ptr<particle_rnumber[]>> getMyRhs() std::vector<std::unique_ptr<particle_rnumber[]>> getMyRhs()
{ {
return std::move(std::vector<std::unique_ptr<particle_rnumber[]>>()); return std::vector<std::unique_ptr<particle_rnumber[]>>();
} }
}; };
......
...@@ -223,7 +223,7 @@ class particles_input_grid: public abstract_particles_input<partsize_t, particle ...@@ -223,7 +223,7 @@ class particles_input_grid: public abstract_particles_input<partsize_t, particle
std::vector<std::unique_ptr<particle_rnumber[]>> getMyRhs() std::vector<std::unique_ptr<particle_rnumber[]>> getMyRhs()
{ {
return std::move(std::vector<std::unique_ptr<particle_rnumber[]>>()); return std::vector<std::unique_ptr<particle_rnumber[]>>();
} }
std::vector<hsize_t> getParticleFileLayout() std::vector<hsize_t> getParticleFileLayout()
......
...@@ -262,7 +262,7 @@ class particles_input_random: public abstract_particles_input<partsize_t, partic ...@@ -262,7 +262,7 @@ class particles_input_random: public abstract_particles_input<partsize_t, partic
std::vector<std::unique_ptr<particle_rnumber[]>> getMyRhs() std::vector<std::unique_ptr<particle_rnumber[]>> getMyRhs()
{ {
return std::move(std::vector<std::unique_ptr<particle_rnumber[]>>()); return std::vector<std::unique_ptr<particle_rnumber[]>>();
} }
std::vector<hsize_t> getParticleFileLayout() std::vector<hsize_t> getParticleFileLayout()
......
...@@ -54,13 +54,13 @@ template <class RetType, ...@@ -54,13 +54,13 @@ template <class RetType,
struct For2{ struct For2{
static RetType evaluate(IterType2 value2, Args... args){ static RetType evaluate(IterType2 value2, Args... args){
if(CurrentIter2 == value2){ if(CurrentIter2 == value2){
return std::move(Func::template instanciate<CurrentIter1, CurrentIter2>(args...)); return Func::template instanciate<CurrentIter1, CurrentIter2>(args...);
} }
else{ else{
return std::move(For2<RetType, return For2<RetType,
IterType1, CurrentIter1, IterType1, CurrentIter1,
IterType2, CurrentIter2+IterStep2, iterTo2, IterStep2, IterType2, CurrentIter2+IterStep2, iterTo2, IterStep2,
Func, (CurrentIter2+IterStep2 < iterTo2), Args...>::evaluate(value2, args...)); Func, (CurrentIter2+IterStep2 < iterTo2), Args...>::evaluate(value2, args...);
} }
} }
}; };
...@@ -86,16 +86,16 @@ template <class RetType, ...@@ -86,16 +86,16 @@ template <class RetType,
struct For1{ struct For1{
static RetType evaluate(IterType1 value1, IterType2 value2, Args... args){ static RetType evaluate(IterType1 value1, IterType2 value2, Args... args){
if(CurrentIter1 == value1){ if(CurrentIter1 == value1){
return std::move(For2<RetType, return For2<RetType,
IterType1, CurrentIter1, IterType1, CurrentIter1,
IterType2, IterFrom2, iterTo2, IterStep2, IterType2, IterFrom2, iterTo2, IterStep2,
Func, (IterFrom2<iterTo2), Args...>::evaluate(value2, args...)); Func, (IterFrom2<iterTo2), Args...>::evaluate(value2, args...);
} }
else{ else{
return std::move(For1<RetType, return For1<RetType,
IterType1, CurrentIter1+IterStep1, iterTo1, IterStep1, IterType1, CurrentIter1+IterStep1, iterTo1, IterStep1,
IterType2, IterFrom2, iterTo2, IterStep2, IterType2, IterFrom2, iterTo2, IterStep2,
Func, (CurrentIter1+IterStep1 < iterTo1), Args...>::evaluate(value1, value2, args...)); Func, (CurrentIter1+IterStep1 < iterTo1), Args...>::evaluate(value1, value2, args...);
} }
} }
}; };
...@@ -119,10 +119,10 @@ template <class RetType, ...@@ -119,10 +119,10 @@ template <class RetType,
class IterType2, const IterType2 IterFrom2, const IterType2 iterTo2, const IterType2 IterStep2, class IterType2, const IterType2 IterFrom2, const IterType2 iterTo2, const IterType2 IterStep2,
class Func, typename... Args> class Func, typename... Args>
inline RetType evaluate(IterType1 value1, IterType2 value2, Args... args){ inline RetType evaluate(IterType1 value1, IterType2 value2, Args... args){
return std::move(For1<RetType, return For1<RetType,
IterType1, IterFrom1, iterTo1, IterStep1, IterType1, IterFrom1, iterTo1, IterStep1,
IterType2, IterFrom2, iterTo2, IterStep2, IterType2, IterFrom2, iterTo2, IterStep2,
Func, (IterFrom1<iterTo1), Args...>::evaluate(value1, value2, args...)); Func, (IterFrom1<iterTo1), Args...>::evaluate(value1, value2, args...);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment