From: Daniel Arndt Date: Fri, 20 Sep 2019 00:07:55 +0000 (-0600) Subject: Avoid calling the constructor for emplace_back X-Git-Tag: v9.2.0-rc1~1068^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F8807%2Fhead;p=dealii.git Avoid calling the constructor for emplace_back --- diff --git a/include/deal.II/lac/vector_memory.templates.h b/include/deal.II/lac/vector_memory.templates.h index 9e5df3160d..13934d112b 100644 --- a/include/deal.II/lac/vector_memory.templates.h +++ b/include/deal.II/lac/vector_memory.templates.h @@ -132,8 +132,7 @@ GrowingVectorMemory::alloc() } // no free vector found, so let's just allocate a new one - get_pool().data->emplace_back( - entry_type(true, std_cxx14::make_unique())); + get_pool().data->emplace_back(true, std_cxx14::make_unique()); return get_pool().data->back().second.get(); } diff --git a/source/base/parsed_convergence_table.cc b/source/base/parsed_convergence_table.cc index cb00e76f1c..cfcf8bca63 100644 --- a/source/base/parsed_convergence_table.cc +++ b/source/base/parsed_convergence_table.cc @@ -48,10 +48,10 @@ namespace for (unsigned int i = 0; i < component_names.size(); ++i) { if (unique_component_names[j] != component_names[i]) - masks.emplace_back(ComponentMask(bools[j++])); + masks.emplace_back(bools[j++]); bools[j][i] = true; } - masks.emplace_back(ComponentMask(bools[j++])); + masks.emplace_back(bools[j++]); AssertDimension(j, unique_component_names.size()); return masks; } diff --git a/source/dofs/dof_handler_policy.cc b/source/dofs/dof_handler_policy.cc index d47eda9007..20726bb6e1 100644 --- a/source/dofs/dof_handler_policy.cc +++ b/source/dofs/dof_handler_policy.cc @@ -3476,7 +3476,7 @@ namespace internal numbers::invalid_subdomain_id, *dof_handler, level); // then add a complete, sequential index set - number_caches.emplace_back(NumberCache(n_level_dofs)); + number_caches.emplace_back(n_level_dofs); } const_cast