Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
0d85e7b4
Commit
0d85e7b4
authored
Jun 07, 2018
by
COULAUD Olivier
Browse files
Remove deallocate call in copy constructor
parent
4ccc09cb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Components/FBasicParticleContainer.hpp
View file @
0d85e7b4
...
...
@@ -136,10 +136,8 @@ public:
/////////////////////////////////////////////////////
/////////////////////////////////////////////////////
// FBasicParticleContainer(const FBasicParticleContainer& leaf) = delete;
FBasicParticleContainer
(
FBasicParticleContainer
&
leaf
)
:
nbParticles
(
leaf
.
nbParticles
),
allocatedParticles
(
leaf
.
allocatedParticles
)
{
// allocate memory
const
FSize
moduloParticlesNumber
=
(
MemoryAlignement
/
sizeof
(
FReal
));
allocatedParticles
=
(
nbParticles
+
moduloParticlesNumber
-
1
)
&
~
(
moduloParticlesNumber
-
1
);
...
...
@@ -150,8 +148,9 @@ public:
FReal
*
const
oldData
=
(
leaf
.
getWPositions
()[
0
]);
std
::
copy
(
oldData
,
oldData
+
allocatedBytes
,
newData
)
;
//
// Fill the structure
FAlignedMemory
::
DeallocBytes
(
positions
[
0
]);
//
for
(
int
idx
=
0
;
idx
<
3
;
++
idx
){
positions
[
idx
]
=
newData
+
(
allocatedParticles
*
idx
);
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment