Mercurial > hg > openttd
changeset 3949:07231f02199e draft
(svn r5095) -CodeChange: {} added around returns
author | KUDr <KUDr@openttd.org> |
---|---|
date | Sun, 04 Jun 2006 09:31:20 +0000 |
parents | 8e657943e452 |
children | 74c06056c90a |
files | aystar.c |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/aystar.c +++ b/aystar.c @@ -149,8 +149,9 @@ // 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 @@ // 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; + } } /*