Commit 33206876 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

improve enumerate so arbitrary ranges can be enumerated quickly

Originally committed as revision 7033 to svn://
parent 8cb97693
......@@ -93,9 +93,9 @@ void av_tree_destroy(AVTreeNode *t){
#if 0
void av_tree_enumerate(AVTreeNode *t, void *opaque, int (*f)(void *opaque, void *elem)){
f(opaque, t->elem);
av_tree_enumerate(t->child[0], opaque, f);
av_tree_enumerate(t->child[1], opaque, f);
int v= f(opaque, t->elem);
if(v>=0) av_tree_enumerate(t->child[0], opaque, f);
if(v<=0) av_tree_enumerate(t->child[1], opaque, f);
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