Mercurial > fife-parpg
comparison engine/core/pathfinder/routepather/routepathersearch.h @ 293:66df2422a8b0
Added destructor to the routepathersearch class.
Attempt to fix the memory leak reported by Unknown-Horizons.
author | wenlin_fife@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Tue, 30 Jun 2009 20:03:02 +0000 |
parents | 6362c6812580 |
children | faabfaf25f15 |
comparison
equal
deleted
inserted
replaced
292:6362c6812580 | 293:66df2422a8b0 |
---|---|
45 */ | 45 */ |
46 class RoutePatherSearch { | 46 class RoutePatherSearch { |
47 public: | 47 public: |
48 RoutePatherSearch(const int session_id, const Location& from, const Location& to, SearchSpace* searchSpace); | 48 RoutePatherSearch(const int session_id, const Location& from, const Location& to, SearchSpace* searchSpace); |
49 | 49 |
50 ~RoutePatherSearch(); | |
51 | |
50 typedef std::list<Location> Path; | 52 typedef std::list<Location> Path; |
51 /** An enumeration of the different status the search can be in. | 53 /** An enumeration of the different status the search can be in. |
52 * | 54 * |
53 */ | 55 */ |
54 enum SearchStatus { | 56 enum SearchStatus { |
93 */ | 95 */ |
94 void setSearchStatus(const SearchStatus status) { | 96 void setSearchStatus(const SearchStatus status) { |
95 m_status = status; | 97 m_status = status; |
96 } | 98 } |
97 | 99 |
100 private: | |
98 //A location object representing where the search started. | 101 //A location object representing where the search started. |
99 Location m_to; | 102 Location m_to; |
100 | 103 |
101 //A location object representing where the search ended. | 104 //A location object representing where the search ended. |
102 Location m_from; | 105 Location m_from; |
108 SearchSpace* m_searchspace; | 111 SearchSpace* m_searchspace; |
109 | 112 |
110 //An enumeration of the searches current status. | 113 //An enumeration of the searches current status. |
111 SearchStatus m_status; | 114 SearchStatus m_status; |
112 | 115 |
113 private: | |
114 //The class to use to calculate the heuristic value. | 116 //The class to use to calculate the heuristic value. |
115 Heuristic* m_heuristic; | 117 Heuristic* m_heuristic; |
116 //The destination coordinate as an int. | 118 //The destination coordinate as an int. |
117 int m_destCoordInt; | 119 int m_destCoordInt; |
118 //The start coordinate as an int. | 120 //The start coordinate as an int. |