]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use std::unique_ptr instead of std::shared_ptr in FESystem. 4277/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Tue, 18 Apr 2017 02:51:27 +0000 (20:51 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Tue, 18 Apr 2017 19:37:54 +0000 (13:37 -0600)
include/deal.II/fe/fe_system.h
source/fe/fe_system.cc

index 73029e2c912e6233b4a570c7277c28ccaf107865..c8a3e6b9fa22773842b0f4c04c04283c8dab5a64 100644 (file)
 #include <deal.II/base/thread_management.h>
 #include <deal.II/fe/fe.h>
 #include <vector>
+#include <memory>
 #include <utility>
 
+
 DEAL_II_NAMESPACE_OPEN
 
 template <int dim, int spacedim> class FE_Enriched;
@@ -968,7 +970,7 @@ private:
    * pointers to the underlying base finite elements. The last one of these
    * copies around will then delete the pointer to the base elements.
    */
-  std::vector<std::pair<std::shared_ptr<const FiniteElement<dim,spacedim> >,
+  std::vector<std::pair<std::unique_ptr<const FiniteElement<dim,spacedim> >,
       unsigned int> >
       base_elements;
 
index 195af9f5937107d2a828aa74339f33e1ee0f833f..db57a865e5335c8e00f2382161ee5162e4b88867 100644 (file)
@@ -1478,7 +1478,7 @@ void FESystem<dim,spacedim>::initialize (const std::vector<const FiniteElement<d
           clone_base_elements += Threads::new_task ([ &,i,ind] ()
           {
             base_elements[ind]
-              = std::make_pair (std::shared_ptr<FiniteElement<dim,spacedim>>(fes[i]->clone()),
+              = std::make_pair (std::unique_ptr<FiniteElement<dim,spacedim>>(fes[i]->clone()),
                                 multiplicities[i]);
           });
           ++ind;

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.