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
52a38602
Commit
52a38602
authored
9 years ago
by
Oliver Sander
Browse files
Options
Downloads
Patches
Plain Diff
[cleanup] Use make_shared instead of 'new'
parent
0d01ad27
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/common/arraylist.hh
+3
-3
3 additions, 3 deletions
dune/common/arraylist.hh
with
3 additions
and
3 deletions
dune/common/arraylist.hh
+
3
−
3
View file @
52a38602
...
...
@@ -6,8 +6,8 @@
#include
<cassert>
#include
<vector>
#include
<array>
#include
"shared_ptr.hh"
#include
"array.hh"
#include
"iteratorfacades.hh"
namespace
Dune
...
...
@@ -40,7 +40,7 @@ namespace Dune
*
* Internally the data is organised in a list of arrays of fixed size.
* Whenever the capacity of the array list is not sufficient a new
*
Dune
::array is allocated. In contrast to
*
std
::array is allocated. In contrast to
* std::vector this approach prevents data copying. On the outside
* we provide the same interface as the stl random access containers.
*
...
...
@@ -493,7 +493,7 @@ namespace Dune
size_t
index
=
start_
+
size_
;
if
(
index
==
capacity_
)
{
chunks_
.
push_back
(
s
hared_ptr
<
std
::
array
<
MemberType
,
chunkSize_
>
>
(
new
std
::
array
<
MemberType
,
chunkSize_
>
(
)
));
chunks_
.
push_back
(
s
td
::
make_shared
<
std
::
array
<
MemberType
,
chunkSize_
>
>
());
capacity_
+=
chunkSize_
;
}
elementAt
(
index
)
=
entry
;
...
...
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