From 3ddacd14a8c32c2bdc47f092b75578858c8db64a Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Thu, 18 Nov 2021 15:40:06 -0700 Subject: [PATCH] Use emplace_back() over push_back(). --- source/grid/grid_in.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/grid/grid_in.cc b/source/grid/grid_in.cc index ee81203adb..33b1010086 100644 --- a/source/grid/grid_in.cc +++ b/source/grid/grid_in.cc @@ -1702,12 +1702,12 @@ GridIn::read_comsol_mphtxt(std::istream &in) { if (spacedim == 1) { - cells.push_back({}); + cells.emplace_back(); cells.back().vertices = vertices_for_this_element; } else { - subcelldata.boundary_lines.push_back({}); + subcelldata.boundary_lines.emplace_back(); subcelldata.boundary_lines.back().vertices = vertices_for_this_element; } @@ -1716,12 +1716,12 @@ GridIn::read_comsol_mphtxt(std::istream &in) { if (spacedim == 2) { - cells.push_back({}); + cells.emplace_back(); cells.back().vertices = vertices_for_this_element; } else { - subcelldata.boundary_quads.push_back({}); + subcelldata.boundary_quads.emplace_back(); subcelldata.boundary_quads.back().vertices = vertices_for_this_element; } @@ -1730,7 +1730,7 @@ GridIn::read_comsol_mphtxt(std::istream &in) { if (spacedim == 3) { - cells.push_back({}); + cells.emplace_back(); cells.back().vertices = vertices_for_this_element; } else -- 2.39.5