You need to sign in or sign up before continuing.
Commit d7d7f008 authored by Warren Dukes's avatar Warren Dukes

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
parent 904eaf36
...@@ -621,20 +621,8 @@ void IncrementTreeIterator(TreeIterator * iter) ...@@ -621,20 +621,8 @@ void IncrementTreeIterator(TreeIterator * iter)
while (iter->node && iter->which > iter->node->count) while (iter->node && iter->which > iter->node->count)
{ {
TreeNode * childNode = iter->node; iter->which = iter->node->parentPos + 1;
iter->node = childNode->parent; iter->node = iter->node->parent;
if (iter->node)
{
for (iter->which = 0;
childNode !=
iter->node->children[iter->which];
iter->which++)
{
assert(iter->which <=
iter->node->count);
}
iter->which++;
}
} }
if (iter->node && if (iter->node &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment