equal
deleted
inserted
replaced
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; |