nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
compiler: skip compilation of broken methods
[nit.git]
/
lib
/
a_star.nit
diff --git
a/lib/a_star.nit
b/lib/a_star.nit
index
0bac578
..
9735d90
100644
(file)
--- a/
lib/a_star.nit
+++ b/
lib/a_star.nit
@@
-116,7
+116,7
@@
class Node
loop
var frontier_node: nullable N = null
loop
var frontier_node: nullable N = null
- var bucket_searched: Int = 0
+ var bucket_searched = 0
# find next valid node in frontier/buckets
loop
# find next valid node in frontier/buckets
loop
@@
-147,7
+147,8
@@
class Node
while frontier_node != self do
path.nodes.unshift(frontier_node)
while frontier_node != self do
path.nodes.unshift(frontier_node)
- frontier_node = frontier_node.best_source.as(not null)
+ frontier_node = frontier_node.best_source
+ assert frontier_node != null
end
return path
end
return path