Skip to content

Commit 7d9106e

Browse files
committed
optimize astar algorithm with an extra array for fast testing openset
1 parent 1b92df7 commit 7d9106e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/astar.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ namespace alg {
8585
uint32_t ncol = m_grid.col();
8686

8787
// test wheather the (x1, y1) is the wall, we don't do stupid searching.
88-
//if (m_grid(x1, y1) == WALL) {
89-
// return NULL;
90-
//}
88+
if (m_grid(x1, y1) == WALL) {
89+
return NULL;
90+
}
9191

9292
// the set of tentavie nodes to be evaluated,
9393
// initialy containing the start node

0 commit comments

Comments
 (0)