Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 864dad03 authored by PIACIBELLO Cyrille's avatar PIACIBELLO Cyrille Committed by BRAMAS Berenger

minor fix in delete

parent 10185739
......@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment