Tree
- Simplified ::removeAllBranches, and in so doing, eliminated a segfault on some OSes. No idea why.
This commit is contained in:
@@ -94,14 +94,7 @@ void Tree::removeBranch (Tree* branch)
|
|||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
void Tree::removeAllBranches ()
|
void Tree::removeAllBranches ()
|
||||||
{
|
{
|
||||||
for (std::vector <Tree*>::iterator i = _branches.begin ();
|
_branches.erase (_branches.begin (), _branches.end ());
|
||||||
i != _branches.end ();
|
|
||||||
++i)
|
|
||||||
{
|
|
||||||
delete *i;
|
|
||||||
}
|
|
||||||
|
|
||||||
_branches.clear ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|||||||
Reference in New Issue
Block a user