]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Avoid a copy of a vector. 13571/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Wed, 23 Mar 2022 17:21:30 +0000 (11:21 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Wed, 23 Mar 2022 17:21:30 +0000 (11:21 -0600)
source/grid/tria.cc

index ea2dc6fa2f5a225a8368d91a163b0b351be5cbf4..1174e3f9f09ce44b072fbc249c9f161484cdbd9a 100644 (file)
@@ -14642,10 +14642,9 @@ Triangulation<dim, spacedim>::update_reference_cells()
     if (cell->is_locally_owned())
       reference_cells_set.insert(cell->reference_cell());
 
-  std::vector<ReferenceCell> reference_cells(reference_cells_set.begin(),
-                                             reference_cells_set.end());
-
-  this->reference_cells = reference_cells;
+  this->reference_cells =
+    std::vector<ReferenceCell>(reference_cells_set.begin(),
+                               reference_cells_set.end());
 }
 
 

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.