]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Merge pull request #4277 from bangerth/use-unique-ptr
authorBruno Turcksin <bruno.turcksin@gmail.com>
Wed, 19 Apr 2017 12:43:42 +0000 (08:43 -0400)
committerGitHub <noreply@github.com>
Wed, 19 Apr 2017 12:43:42 +0000 (08:43 -0400)
Use std::unique_ptr instead of std::shared_ptr in FESystem.

1  2 
include/deal.II/fe/fe_system.h
source/fe/fe_system.cc

index 20b7cb3c33d0e3ef7c75bed2ab92871a3d4ae51b,c8a3e6b9fa22773842b0f4c04c04283c8dab5a64..9e1870529bde75a325f0a5d86027b0ee55663885
@@@ -966,8 -962,15 +968,8 @@@ private
     * This object contains a pointer to each contributing element of a mixed
     * discretization and its multiplicity. It is created by the constructor and
     * constant afterwards.
 -   *
 -   * The pointers are managed as shared pointers. This ensures that we can use
 -   * the copy constructor of this class without having to manage cloning the
 -   * elements themselves. Since finite element objects do not contain any
 -   * state, this also allows multiple copies of an FESystem object to share
 -   * 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;
  
Simple merge

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.