projects
/
c11tester.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6903f0
)
Fix a bug
author
weiyu
<weiyuluo1232@gmail.com>
Tue, 8 Oct 2019 20:01:21 +0000
(13:01 -0700)
committer
weiyu
<weiyuluo1232@gmail.com>
Tue, 8 Oct 2019 20:01:21 +0000
(13:01 -0700)
funcnode.cc
patch
|
blob
|
history
diff --git
a/funcnode.cc
b/funcnode.cc
index 70cc44725f0887280ce4a5ec70770f6081b0be5b..a3407b44a3ea561088287bdd8c00d3dfe7f9b842 100644
(file)
--- a/
funcnode.cc
+++ b/
funcnode.cc
@@
-660,10
+660,10
@@
int FuncNode::compute_distance(FuncNode * target, int max_step)
FuncNode * curr = queue.front();
queue.pop_front();
- if (curr == target)
- return dist;
- else if (max_step < dist)
+ if (max_step < dist)
return -1;
+ else if (curr == target)
+ return dist;
dist++;
ModelList<FuncNode *> * outEdges = curr->get_out_edges();