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 ()
|
||||
{
|
||||
for (std::vector <Tree*>::iterator i = _branches.begin ();
|
||||
i != _branches.end ();
|
||||
++i)
|
||||
{
|
||||
delete *i;
|
||||
}
|
||||
|
||||
_branches.clear ();
|
||||
_branches.erase (_branches.begin (), _branches.end ());
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user