mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 09:17:19 +02:00
Tree
- Simplified ::removeAllBranches, and in so doing, eliminated a segfault on some OSes. No idea why.
This commit is contained in:
parent
c21bacedf6
commit
f5908f6514
1 changed files with 1 additions and 8 deletions
|
@ -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 ();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue