yapf/yapf_costrail.hpp
changeset 4549 60410aa1aa88
parent 3979 4a9826b12e56
child 5095 fd35de11728c
equal deleted inserted replaced
4548:23b56455df33 4549:60410aa1aa88
   158 
   158 
   159 public:
   159 public:
   160 	FORCEINLINE void SetMaxCost(int max_cost) {m_max_cost = max_cost;}
   160 	FORCEINLINE void SetMaxCost(int max_cost) {m_max_cost = max_cost;}
   161 
   161 
   162 	/** Called by YAPF to calculate the cost from the origin to the given node.
   162 	/** Called by YAPF to calculate the cost from the origin to the given node.
   163 	*   Calculates only the cost of given node, adds it to the parent node cost
   163 	 *  Calculates only the cost of given node, adds it to the parent node cost
   164 	*   and stores the result into Node::m_cost member */
   164 	 *  and stores the result into Node::m_cost member */
   165 	FORCEINLINE bool PfCalcCost(Node& n)
   165 	FORCEINLINE bool PfCalcCost(Node& n)
   166 	{
   166 	{
   167 		assert(!n.flags_u.flags_s.m_targed_seen);
   167 		assert(!n.flags_u.flags_s.m_targed_seen);
   168 		CPerfStart perf_cost(Yapf().m_perf_cost);
   168 		CPerfStart perf_cost(Yapf().m_perf_cost);
   169 		int parent_cost = (n.m_parent != NULL) ? n.m_parent->m_cost : 0;
   169 		int parent_cost = (n.m_parent != NULL) ? n.m_parent->m_cost : 0;