Skip to content

Commit

Permalink
[OCTREE] Fix the 'OctreeDepthFirstIterator<OctreeT>::operator++' be g…
Browse files Browse the repository at this point in the history
…et the intuitive order.
  • Loading branch information
frozar committed Jun 19, 2018
1 parent f7f6c03 commit 678d2c8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions octree/include/pcl/octree/impl/octree_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,16 @@ namespace pcl
if ( (this->max_octree_depth_>=stack_entry.depth_) &&
(stack_entry.node_->getNodeType () == BRANCH_NODE) )
{
unsigned char child_idx;

// current node is a branch node
BranchNode* current_branch =
static_cast<BranchNode*> (stack_entry.node_);

unsigned char child_idx = 8;

// add all children to stack
for (child_idx = 0; child_idx < 8; ++child_idx)
do
{
--child_idx;

// if child exist

Expand All @@ -156,7 +157,7 @@ namespace pcl

current_key.popBranch();
}
}
} while (child_idx != 0);
}

if (stack_.size ())
Expand Down

0 comments on commit 678d2c8

Please sign in to comment.