src/yapf/yapf_base.hpp
branchgamebalance
changeset 9910 0b2aebc8283e
parent 6458 5cd016e1f018
child 6720 35756db7e577
child 7533 f43efe7a2b23
--- a/src/yapf/yapf_base.hpp	Wed Jun 13 11:00:24 2007 +0000
+++ b/src/yapf/yapf_base.hpp	Wed Jun 13 11:17:30 2007 +0000
@@ -117,7 +117,8 @@
 		while (true) {
 			m_num_steps++;
 			Node *n = m_nodes.GetBestOpenNode();
-			if (n == NULL) break;
+			if (n == NULL)
+				break;
 
 			// if the best open node was worse than the best path found, we can finish
 			if (m_pBestDestNode != NULL && m_pBestDestNode->GetCost() < n->GetCostEstimate())
@@ -160,9 +161,9 @@
 	/** If path was found return the best node that has reached the destination. Otherwise
 	 *  return the best visited node (which was nearest to the destination).
 	 */
-	FORCEINLINE Node& GetBestNode()
+	FORCEINLINE Node* GetBestNode()
 	{
-		return (m_pBestDestNode != NULL) ? *m_pBestDestNode : *m_pBestIntermediateNode;
+		return (m_pBestDestNode != NULL) ? m_pBestDestNode : m_pBestIntermediateNode;
 	}
 
 	/** Calls NodeList::CreateNewNode() - allocates new node that can be filled and used