From: Wolfgang Bangerth Date: Thu, 18 Nov 2021 22:40:06 +0000 (-0700) Subject: Use emplace_back() over push_back(). X-Git-Tag: v9.4.0-rc1~817^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ddacd14a8c32c2bdc47f092b75578858c8db64a;p=dealii.git Use emplace_back() over push_back(). --- 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