summaryrefslogtreecommitdiff
path: root/aystar.c
diff options
context:
space:
mode:
authorKUDr <KUDr@openttd.org>2006-06-04 09:31:20 +0000
committerKUDr <KUDr@openttd.org>2006-06-04 09:31:20 +0000
commiteb975d6fda6f1ff80f683417379f6ece33b404a0 (patch)
tree781c185a3f3286cd96c2b766ec71f3afad223ce9 /aystar.c
parent9ee944cabb0a716514175b37311819b439be0298 (diff)
downloadopenttd-eb975d6fda6f1ff80f683417379f6ece33b404a0.tar.xz
(svn r5095) -CodeChange: {} added around returns
Diffstat (limited to 'aystar.c')
-rw-r--r--aystar.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/aystar.c b/aystar.c
index c34c28ce2..88b187497 100644
--- a/aystar.c
+++ b/aystar.c
@@ -149,8 +149,9 @@ int AyStarMain_Loop(AyStar *aystar) {
// Get the best node from OpenList
OpenListNode *current = AyStarMain_OpenList_Pop(aystar);
// If empty, drop an error
- if (current == NULL)
+ if (current == NULL) {
return AYSTAR_EMPTY_OPENLIST;
+ }
// Check for end node and if found, return that code
if (aystar->EndNodeCheck(aystar, current) == AYSTAR_FOUND_END_NODE) {
@@ -175,12 +176,13 @@ int AyStarMain_Loop(AyStar *aystar) {
// Free the node
free(current);
- if (aystar->max_search_nodes != 0 && Hash_Size(&aystar->ClosedListHash) >= aystar->max_search_nodes)
+ if (aystar->max_search_nodes != 0 && Hash_Size(&aystar->ClosedListHash) >= aystar->max_search_nodes) {
/* We've expanded enough nodes */
return AYSTAR_LIMIT_REACHED;
- else
+ } else {
// Return that we are still busy
return AYSTAR_STILL_BUSY;
+ }
}
/*