Skip to content

Commit

Permalink
Orthtree: Fix in test code
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Jun 30, 2022
1 parent 2b836ab commit efddc4a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Orthtree/include/CGAL/Orthtree/Node.h
Expand Up @@ -48,18 +48,22 @@ struct Node_access
template <typename Node>
static void free(Node node)
{
typedef Dimension_tag<(2 << (Node::Dimension::value - 1))> Degree;
std::queue<Node> nodes;
nodes.push(node);
while (!nodes.empty())
{
Node node = nodes.front();
nodes.pop();
if (!node.is_leaf())
for (std::size_t i = 0; i < Node::Dimension::value; ++ i)
if (!node.is_leaf()){
for (std::size_t i = 0; i < Degree::value; ++ i){
nodes.push (node[i]);
}
}
node.free();
}
}

};

} // namespace Orthtrees
Expand Down

0 comments on commit efddc4a

Please sign in to comment.