]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Micro-optimization: Use move semantics in one place. 11112/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 27 Oct 2020 20:58:17 +0000 (14:58 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 27 Oct 2020 20:58:17 +0000 (14:58 -0600)
This is the last use of the variable in this location -- might as well move instead of
copy it.

source/particles/particle_handler.cc

index 7261572fa36c0e73fc40a12c3d47d9b61ccaef10..83cfac4a13d997aa362828a3dd8e0f093467e489 100644 (file)
@@ -692,7 +692,7 @@ namespace Particles
               }
 
             particles.emplace(local_cells_containing_particles[i_cell],
-                              particle);
+                              std::move(particle));
           }
       }
 

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.