From 12872aa96cb0232b6564130c2d79e406eb0bd1bd Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Wed, 23 Mar 2022 11:21:30 -0600 Subject: [PATCH] Avoid a copy of a vector. --- source/grid/tria.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/source/grid/tria.cc b/source/grid/tria.cc index ea2dc6fa2f..1174e3f9f0 100644 --- a/source/grid/tria.cc +++ b/source/grid/tria.cc @@ -14642,10 +14642,9 @@ Triangulation::update_reference_cells() if (cell->is_locally_owned()) reference_cells_set.insert(cell->reference_cell()); - std::vector reference_cells(reference_cells_set.begin(), - reference_cells_set.end()); - - this->reference_cells = reference_cells; + this->reference_cells = + std::vector(reference_cells_set.begin(), + reference_cells_set.end()); } -- 2.39.5