From 555efc20555a111f081a7443b6e4fc48dcab9343 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Thu, 19 Sep 2019 18:07:55 -0600 Subject: [PATCH] Avoid calling the constructor for emplace_back --- include/deal.II/lac/vector_memory.templates.h | 3 +-- source/base/parsed_convergence_table.cc | 4 ++-- source/dofs/dof_handler_policy.cc | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) 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