]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Don't make copies of expensive objects. 14492/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 29 Nov 2022 15:43:48 +0000 (08:43 -0700)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 29 Nov 2022 15:43:48 +0000 (08:43 -0700)
source/dofs/dof_renumbering.cc

index 3486224312e32a5acb7bb38db202135d5889d129..c80b47359463c0730dc25696ed889c22d03e8e36 100644 (file)
@@ -759,8 +759,8 @@ namespace DoFRenumbering
                          const std::vector<unsigned int> &component_order_arg,
                          const bool                       is_level_operation)
   {
-    const hp::FECollection<dim, spacedim> fe_collection(
-      start->get_dof_handler().get_fe_collection());
+    const hp::FECollection<dim, spacedim> &fe_collection =
+      start->get_dof_handler().get_fe_collection();
 
     // do nothing if the FE has only
     // one component
@@ -1072,8 +1072,8 @@ namespace DoFRenumbering
                      const ENDITERATOR &                   end,
                      const bool                            is_level_operation)
   {
-    const hp::FECollection<dim, spacedim> fe_collection(
-      start->get_dof_handler().get_fe_collection());
+    const hp::FECollection<dim, spacedim> &fe_collection =
+      start->get_dof_handler().get_fe_collection();
 
     // do nothing if the FE has only
     // one component

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.