Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
solverstack
ScalFMM
Commits
a9e6d5e7
Commit
a9e6d5e7
authored
Nov 24, 2014
by
PIACIBELLO Cyrille
Browse files
minor fix in delete
parent
92a4285f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Src/Containers/FSubOctree.hpp
View file @
a9e6d5e7
...
...
@@ -51,7 +51,7 @@ template< class CellClass , class ContainerClass, class LeafClass, class CellAll
class
FAbstractSubOctree
{
protected:
CellClass
***
cells
;
//< Potential cells, cells are allocated only if needed
CellClass
***
cells
;
//< Potential cells, cells are allocated only if needed
FAbstractSubOctree
*
const
parent
;
//< Parent suboctree (null for root)
const
int
indexInParent
;
//< This is the index of the current octree in the parent's array
...
...
@@ -60,7 +60,7 @@ protected:
int
rightLeafIndex
;
//< The leaf at the right position (this is the last array index when iterate)
const
int
subOctreeHeight
;
//< Height of this suboctree
const
int
subOctreePosition
;
//< Level of the current suboctree in the global tree (0 if node)
const
int
subOctreePosition
;
//< Level of the current suboctree in the global tree (0 if node)
const
bool
isLeafSubtree
;
//< To know if a subtree is leaf or not (we prefere that to a virtual method)
...
...
@@ -135,8 +135,12 @@ protected:
// Manage border limits
if
(
arrayIndex
==
this
->
leftLeafIndex
&&
arrayIndex
==
this
->
rightLeafIndex
){
this
->
rightLeafIndex
=
-
1
;
this
->
rightLeafIndex
=
-
1
;
// only one cells, return true
// remove the last cells
cellAllocator
.
deleteObject
(
this
->
cells
[
indexLevel
][
arrayIndex
]);
this
->
cells
[
indexLevel
][
arrayIndex
]
=
nullptr
;
return
true
;
}
else
if
(
arrayIndex
==
this
->
leftLeafIndex
){
...
...
@@ -631,4 +635,3 @@ public:
#endif //FSUBOCTREE_HPP
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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