aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2006-08-09 02:13:46 +0000
committerWarren Dukes <warren.dukes@gmail.com>2006-08-09 02:13:46 +0000
commitd7d7f0089a00f60c08e3df882f2564d03eadefde (patch)
tree87e614c0300c6b905f2fc4d59caa180a4475e5c7 /src
parent904eaf361c40fd50e39b7b47484c3f071fdba22a (diff)
downloadmpd-d7d7f0089a00f60c08e3df882f2564d03eadefde.tar.gz
mpd-d7d7f0089a00f60c08e3df882f2564d03eadefde.tar.xz
mpd-d7d7f0089a00f60c08e3df882f2564d03eadefde.zip
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
Diffstat (limited to '')
-rw-r--r--src/tree.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/tree.c b/src/tree.c
index d7eaf4428..96ad36b5f 100644
--- a/src/tree.c
+++ b/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 &&