]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use std::move() with CellData. 13699/head
authorDavid Wells <drwells@email.unc.edu>
Mon, 9 May 2022 15:46:56 +0000 (11:46 -0400)
committerDavid Wells <drwells@email.unc.edu>
Mon, 9 May 2022 21:08:25 +0000 (17:08 -0400)
This now uses a std::vector to store data so we should skip the unnecessary
copy.

source/grid/grid_tools.cc

index b6969e4dacf839ad132c436703e328de61437352..298bc86b85c00e7913015b2de09664ef74802d0a 100644 (file)
@@ -485,7 +485,7 @@ namespace GridTools
         face_cell_data.boundary_id = face->boundary_id();
         face_cell_data.manifold_id = face->manifold_id();
 
-        face_data.insert(face_cell_data);
+        face_data.insert(std::move(face_cell_data));
       }
 
       /**
@@ -596,7 +596,7 @@ namespace GridTools
 
                     line_cell_data.boundary_id = line->boundary_id();
                     line_cell_data.manifold_id = line->manifold_id();
-                    line_data.insert(line_cell_data);
+                    line_data.insert(std::move(line_cell_data));
                   }
               }
           }

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.