# HG changeset patch # User alpar # Date 1125435058 0 # Node ID 30d7e673781f1f21bc0f0118e279564dac89d3b4 # Parent fdeb961110ac3f563b34bdd848c8634353ff6afd Set dists in a bit better way. diff -r fdeb961110ac -r 30d7e673781f lemon/dfs.h --- a/lemon/dfs.h Tue Aug 30 14:55:11 2005 +0000 +++ b/lemon/dfs.h Tue Aug 30 20:50:58 2005 +0000 @@ -512,9 +512,14 @@ _pred->set(s,INVALID); // _predNode->set(u,INVALID); OutEdgeIt e(*G,s); - if(e!=INVALID) _stack[++_stack_head]=e; - else _processed->set(s,true); - _dist->set(s,_stack_head); + if(e!=INVALID) { + _stack[++_stack_head]=e; + _dist->set(s,_stack_head); + } + else { + _processed->set(s,true); + _dist->set(s,0); + } } }