Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Core Modules
dune-common
Commits
92b7e366
Commit
92b7e366
authored
9 years ago
by
Christian Engwer
Browse files
Options
Downloads
Patches
Plain Diff
[parameterizedobject] use unique_ptr instead of shared_ptr
parent
37d17762
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!212
Fix link to build system doc
,
!3
Feature/parameterizedobjectfactory
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/common/parameterizedobject.hh
+3
-3
3 additions, 3 deletions
dune/common/parameterizedobject.hh
with
3 additions
and
3 deletions
dune/common/parameterizedobject.hh
+
3
−
3
View file @
92b7e366
...
...
@@ -3,7 +3,7 @@
#ifndef PARAMETERIZED_OBJECT_HH
#define PARAMETERIZED_OBJECT_HH
#include
<dune/common/s
hared_ptr
.hh>
#include
<dune/common/s
td/memory
.hh>
#include
<dune/common/parametertree.hh>
namespace
Dune
{
...
...
@@ -23,7 +23,7 @@ struct ParameterizedObjectDefaultTag {};
/** @brief The typ of the keys. */
typedef
KeyT
Key
;
/** @brief The type of the shared pointer to the interface. */
typedef
Dune
::
shared
_ptr
<
Interface
>
Type
;
typedef
std
::
unique
_ptr
<
Interface
>
Type
;
/** @brief The type of the function that creates the object. */
typedef
Type
(
*
Creator
)(
Args
...
);
...
...
@@ -63,7 +63,7 @@ struct ParameterizedObjectDefaultTag {};
template
<
class
Impl
>
static
Type
create_func
(
Args
...
args
)
{
return
Dune
::
make_shared
<
Impl
>
(
args
...);
return
Dune
::
Std
::
make_unique
<
Impl
>
(
args
...);
}
typedef
std
::
map
<
Key
,
Creator
>
Registry
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment