we have the parentPos, so use it when incrementing the tree iterator.
git-svn-id: https://svn.musicpd.org/mpd/trunk@4604 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
parent
904eaf361c
commit
d7d7f0089a
16
src/tree.c
16
src/tree.c
@ -621,20 +621,8 @@ void IncrementTreeIterator(TreeIterator * iter)
|
||||
|
||||
while (iter->node && iter->which > iter->node->count)
|
||||
{
|
||||
TreeNode * childNode = iter->node;
|
||||
iter->node = childNode->parent;
|
||||
if (iter->node)
|
||||
{
|
||||
for (iter->which = 0;
|
||||
childNode !=
|
||||
iter->node->children[iter->which];
|
||||
iter->which++)
|
||||
{
|
||||
assert(iter->which <=
|
||||
iter->node->count);
|
||||
}
|
||||
iter->which++;
|
||||
}
|
||||
iter->which = iter->node->parentPos + 1;
|
||||
iter->node = iter->node->parent;
|
||||
}
|
||||
|
||||
if (iter->node &&
|
||||
|
Loading…
Reference in New Issue
Block a user