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:
Warren Dukes 2006-08-09 02:13:46 +00:00
parent 904eaf361c
commit d7d7f0089a

View File

@ -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 &&