From: Wolfgang Bangerth Date: Wed, 23 Mar 2022 17:21:30 +0000 (-0600) Subject: Avoid a copy of a vector. X-Git-Tag: v9.4.0-rc1~343^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F13571%2Fhead;p=dealii.git Avoid a copy of a vector. --- 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()); }