diff --git a/src/pathfinder/aystar.cpp b/src/pathfinder/aystar.cpp index 4e84acd8ee..166aa9a8f3 100644 --- a/src/pathfinder/aystar.cpp +++ b/src/pathfinder/aystar.cpp @@ -25,11 +25,11 @@ void AyStar::OpenListAdd(PathNode *parent, const AyStarNode *node, int f, int g) { /* Add a new Node to the OpenList */ - PathNode *new_node = this->nodes.CreateNewNode(); - new_node->Set(parent, node->tile, node->td, true); - new_node->estimate = f; - new_node->cost = g; - this->nodes.InsertOpenNode(*new_node); + PathNode &new_node = this->nodes.CreateNewNode(); + new_node.Set(parent, node->tile, node->td, true); + new_node.estimate = f; + new_node.cost = g; + this->nodes.InsertOpenNode(new_node); } /** diff --git a/src/pathfinder/aystar.h b/src/pathfinder/aystar.h index 8fa8490644..ad24ad13ff 100644 --- a/src/pathfinder/aystar.h +++ b/src/pathfinder/aystar.h @@ -136,7 +136,7 @@ struct AyStar { void CheckTile(AyStarNode *current, PathNode *parent); protected: - CNodeList_HashTableT nodes; + NodeList nodes; void OpenListAdd(PathNode *parent, const AyStarNode *node, int f, int g); }; diff --git a/src/pathfinder/yapf/nodelist.hpp b/src/pathfinder/yapf/nodelist.hpp index 3e4d39a842..bedc57294e 100644 --- a/src/pathfinder/yapf/nodelist.hpp +++ b/src/pathfinder/yapf/nodelist.hpp @@ -15,38 +15,28 @@ /** * Hash table based node list multi-container class. - * Implements open list, closed list and priority queue for A-star - * path finder. + * Implements open list, closed list and priority queue for A-star pathfinder. */ -template -class CNodeList_HashTableT { +template +class NodeList { public: - typedef Titem_ Titem; ///< Make #Titem_ visible from outside of class. - typedef typename Titem_::Key Key; ///< Make Titem_::Key a property of this class. - using CItemArray = std::deque; ///< Type that we will use as item container. - typedef HashTable COpenList; ///< How pointers to open nodes will be stored. - typedef HashTable CClosedList; ///< How pointers to closed nodes will be stored. - typedef CBinaryHeapT CPriorityQueue; ///< How the priority queue will be managed. + using Item = Titem; + using Key = typename Titem::Key; protected: - CItemArray items; ///< Here we store full item data (Titem_). - COpenList open_nodes; ///< Hash table of pointers to open item data. - CClosedList closed_nodes; ///< Hash table of pointers to closed item data. - CPriorityQueue open_queue; ///< Priority queue of pointers to open item data. - Titem *new_node; ///< New open node under construction. + std::deque items; ///< Storage of the nodes. + HashTable open_nodes; ///< Hash table of pointers to open nodes. + HashTable closed_nodes; ///< Hash table of pointers to closed nodes. + CBinaryHeapT open_queue; ///< Priority queue of pointers to open nodes. + Titem *new_node; ///< New node under construction. public: /** default constructor */ - CNodeList_HashTableT() : open_queue(2048) + NodeList() : open_queue(2048) { this->new_node = nullptr; } - /** destructor */ - ~CNodeList_HashTableT() - { - } - /** return number of open nodes */ inline int OpenCount() { @@ -59,15 +49,21 @@ public: return this->closed_nodes.Count(); } + /** return the total number of nodes. */ + inline int TotalCount() + { + return this->items.Length(); + } + /** allocate new data item from items */ - inline Titem_ *CreateNewNode() + inline Titem &CreateNewNode() { if (this->new_node == nullptr) this->new_node = &this->items.emplace_back(); - return this->new_node; + return *this->new_node; } /** Notify the nodelist that we don't want to discard the given node. */ - inline void FoundBestNode(Titem_ &item) + inline void FoundBestNode(Titem &item) { /* for now it is enough to invalidate m_new_node if it is our given node */ if (&item == this->new_node) { @@ -77,7 +73,7 @@ public: } /** insert given item as open node (into m_open and m_open_queue) */ - inline void InsertOpenNode(Titem_ &item) + inline void InsertOpenNode(Titem &item) { assert(this->closed_nodes.Find(item.GetKey()) == nullptr); this->open_nodes.Push(item); @@ -88,7 +84,7 @@ public: } /** return the best open node */ - inline Titem_ *GetBestOpenNode() + inline Titem *GetBestOpenNode() { if (!this->open_queue.IsEmpty()) { return this->open_queue.Begin(); @@ -97,10 +93,10 @@ public: } /** remove and return the best open node */ - inline Titem_ *PopBestOpenNode() + inline Titem *PopBestOpenNode() { if (!this->open_queue.IsEmpty()) { - Titem_ *item = this->open_queue.Shift(); + Titem *item = this->open_queue.Shift(); this->open_nodes.Pop(*item); return item; } @@ -108,49 +104,42 @@ public: } /** return the open node specified by a key or nullptr if not found */ - inline Titem_ *FindOpenNode(const Key &key) + inline Titem *FindOpenNode(const Key &key) { - Titem_ *item = this->open_nodes.Find(key); - return item; + return this->open_nodes.Find(key); } /** remove and return the open node specified by a key */ - inline Titem_ &PopOpenNode(const Key &key) + inline Titem &PopOpenNode(const Key &key) { - Titem_ &item = this->open_nodes.Pop(key); - size_t idxPop = this->open_queue.FindIndex(item); - this->open_queue.Remove(idxPop); + Titem &item = this->open_nodes.Pop(key); + size_t index = this->open_queue.FindIndex(item); + this->open_queue.Remove(index); return item; } /** close node */ - inline void InsertClosedNode(Titem_ &item) + inline void InsertClosedNode(Titem &item) { assert(this->open_nodes.Find(item.GetKey()) == nullptr); this->closed_nodes.Push(item); } /** return the closed node specified by a key or nullptr if not found */ - inline Titem_ *FindClosedNode(const Key &key) + inline Titem *FindClosedNode(const Key &key) { - Titem_ *item = this->closed_nodes.Find(key); - return item; - } - - /** The number of items. */ - inline int TotalCount() - { - return this->items.Length(); + return this->closed_nodes.Find(key); } /** Get a particular item. */ - inline Titem_ &ItemAt(int idx) + inline Titem &ItemAt(int index) { - return this->items[idx]; + return this->items[index]; } /** Helper for creating output of this array. */ - template void Dump(D &dmp) const + template + void Dump(D &dmp) const { dmp.WriteStructT("data", &this->items); } diff --git a/src/pathfinder/yapf/yapf_base.hpp b/src/pathfinder/yapf/yapf_base.hpp index 1f2d21ca12..ab0d043726 100644 --- a/src/pathfinder/yapf/yapf_base.hpp +++ b/src/pathfinder/yapf/yapf_base.hpp @@ -28,7 +28,7 @@ * NodeList needs to have defined local type Titem - defines the pathfinder node type. * Node needs to define local type Key - the node key in the collection () * - * For node list you can use template class CNodeList_HashTableT, for which + * For node list you can use template class NodeList, for which * you need to declare only your node type. Look at test_yapf.h for an example. * * @@ -48,13 +48,12 @@ template class CYapfBaseT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; typedef typename Types::NodeList NodeList; ///< our node list typedef typename Types::VehicleType VehicleType; ///< the type of vehicle - typedef typename NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables - + typedef typename NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables NodeList nodes; ///< node list multi-container @@ -156,7 +155,7 @@ public: */ inline Node &CreateNewNode() { - Node &node = *this->nodes.CreateNewNode(); + Node &node = this->nodes.CreateNewNode(); return node; } diff --git a/src/pathfinder/yapf/yapf_common.hpp b/src/pathfinder/yapf/yapf_common.hpp index 14fa72ba6c..1f7cd33cdc 100644 --- a/src/pathfinder/yapf/yapf_common.hpp +++ b/src/pathfinder/yapf/yapf_common.hpp @@ -22,9 +22,9 @@ template class CYapfOriginTileT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: TileIndex origin_tile; ///< origin tile @@ -62,9 +62,9 @@ template class CYapfOriginTileTwoWayT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: TileIndex origin_tile; ///< first origin tile @@ -120,9 +120,9 @@ template class CYapfDestinationTileT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: TileIndex dest_tile; ///< destination tile diff --git a/src/pathfinder/yapf/yapf_costcache.hpp b/src/pathfinder/yapf/yapf_costcache.hpp index 9778024f3e..8b887048d3 100644 --- a/src/pathfinder/yapf/yapf_costcache.hpp +++ b/src/pathfinder/yapf/yapf_costcache.hpp @@ -24,8 +24,8 @@ template class CYapfSegmentCostCacheNoneT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type /** * Called by YAPF to attach cached or local segment cost data to the given node. @@ -105,9 +105,9 @@ struct CSegmentCostCacheT : public CSegmentCostCacheBase { template class CYapfSegmentCostCacheGlobalT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables typedef typename Node::CachedData CachedData; typedef typename CachedData::Key CacheKey; typedef CSegmentCostCacheT Cache; diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index 867fa80655..c47719dfad 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -20,10 +20,10 @@ template class CYapfCostRailT : public CYapfCostBase { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables typedef typename Node::CachedData CachedData; protected: diff --git a/src/pathfinder/yapf/yapf_destrail.hpp b/src/pathfinder/yapf/yapf_destrail.hpp index fd4a0e9657..8e72b77176 100644 --- a/src/pathfinder/yapf/yapf_destrail.hpp +++ b/src/pathfinder/yapf/yapf_destrail.hpp @@ -39,9 +39,9 @@ public: template class CYapfDestinationAnyDepotRailT : public CYapfDestinationRailBase { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables /** to access inherited path finder */ Tpf &Yapf() @@ -75,9 +75,9 @@ public: template class CYapfDestinationAnySafeTileRailT : public CYapfDestinationRailBase { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables typedef typename Types::TrackFollower TrackFollower; ///< TrackFollower. Need to typedef for gcc 2.95 /** to access inherited path finder */ @@ -113,9 +113,9 @@ public: template class CYapfDestinationTileOrStationRailT : public CYapfDestinationRailBase { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: TileIndex dest_tile; diff --git a/src/pathfinder/yapf/yapf_node_rail.hpp b/src/pathfinder/yapf/yapf_node_rail.hpp index 45818cc6ae..bb3ed4e45b 100644 --- a/src/pathfinder/yapf/yapf_node_rail.hpp +++ b/src/pathfinder/yapf/yapf_node_rail.hpp @@ -215,7 +215,7 @@ typedef CYapfRailNodeT CYapfRailNodeExitDir; typedef CYapfRailNodeT CYapfRailNodeTrackDir; /* Default NodeList types */ -typedef CNodeList_HashTableT CRailNodeListExitDir; -typedef CNodeList_HashTableT CRailNodeListTrackDir; +typedef NodeList CRailNodeListExitDir; +typedef NodeList CRailNodeListTrackDir; #endif /* YAPF_NODE_RAIL_HPP */ diff --git a/src/pathfinder/yapf/yapf_node_road.hpp b/src/pathfinder/yapf/yapf_node_road.hpp index 824c66d21c..58992f6fea 100644 --- a/src/pathfinder/yapf/yapf_node_road.hpp +++ b/src/pathfinder/yapf/yapf_node_road.hpp @@ -36,7 +36,7 @@ typedef CYapfRoadNodeT CYapfRoadNodeExitDir; typedef CYapfRoadNodeT CYapfRoadNodeTrackDir; /* Default NodeList types */ -typedef CNodeList_HashTableT CRoadNodeListExitDir; -typedef CNodeList_HashTableT CRoadNodeListTrackDir; +typedef NodeList CRoadNodeListExitDir; +typedef NodeList CRoadNodeListTrackDir; #endif /* YAPF_NODE_ROAD_HPP */ diff --git a/src/pathfinder/yapf/yapf_node_ship.hpp b/src/pathfinder/yapf/yapf_node_ship.hpp index 86d368f8f2..99b0f5353f 100644 --- a/src/pathfinder/yapf/yapf_node_ship.hpp +++ b/src/pathfinder/yapf/yapf_node_ship.hpp @@ -36,7 +36,7 @@ typedef CYapfShipNodeT CYapfShipNodeExitDir; typedef CYapfShipNodeT CYapfShipNodeTrackDir; /* Default NodeList types */ -typedef CNodeList_HashTableT CShipNodeListExitDir; -typedef CNodeList_HashTableT CShipNodeListTrackDir; +typedef NodeList CShipNodeListExitDir; +typedef NodeList CShipNodeListTrackDir; #endif /* YAPF_NODE_SHIP_HPP */ diff --git a/src/pathfinder/yapf/yapf_rail.cpp b/src/pathfinder/yapf/yapf_rail.cpp index 133a61754f..51e34a9b71 100644 --- a/src/pathfinder/yapf/yapf_rail.cpp +++ b/src/pathfinder/yapf/yapf_rail.cpp @@ -36,9 +36,9 @@ template class CYapfReserveTrack { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type + typedef typename Types::NodeList::Item Node; ///< this will be our node type protected: /** to access inherited pathfinder */ @@ -203,10 +203,10 @@ template class CYapfFollowAnyDepotRailT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: /** to access inherited path finder */ @@ -294,10 +294,10 @@ template class CYapfFollowAnySafeTileRailT : public CYapfReserveTrack { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: /** to access inherited path finder */ @@ -376,10 +376,10 @@ template class CYapfFollowRailT : public CYapfReserveTrack { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: /** to access inherited path finder */ diff --git a/src/pathfinder/yapf/yapf_road.cpp b/src/pathfinder/yapf/yapf_road.cpp index 8adcddf9bf..267332653c 100644 --- a/src/pathfinder/yapf/yapf_road.cpp +++ b/src/pathfinder/yapf/yapf_road.cpp @@ -21,8 +21,8 @@ class CYapfCostRoadT public: typedef typename Types::Tpf Tpf; ///< pathfinder (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; ///< track follower helper - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: int max_cost; @@ -187,10 +187,10 @@ template class CYapfDestinationAnyDepotRoadT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables /** to access inherited path finder */ Tpf &Yapf() @@ -225,10 +225,10 @@ template class CYapfDestinationTileRoadT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: TileIndex dest_tile; @@ -326,10 +326,10 @@ template class CYapfFollowRoadT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class) typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type - typedef typename Node::Key Key; ///< key to hash tables + typedef typename Types::NodeList::Item Node; ///< this will be our node type + typedef typename Node::Key Key; ///< key to hash tables protected: /** to access inherited path finder */ diff --git a/src/pathfinder/yapf/yapf_ship.cpp b/src/pathfinder/yapf/yapf_ship.cpp index 0be35c86a1..72c9dd7412 100644 --- a/src/pathfinder/yapf/yapf_ship.cpp +++ b/src/pathfinder/yapf/yapf_ship.cpp @@ -28,10 +28,10 @@ template class CYapfDestinationTileWaterT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class). + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class). typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type. - typedef typename Node::Key Key; ///< key to hash tables. + typedef typename Types::NodeList::Item Node; ///< this will be our node type. + typedef typename Node::Key Key; ///< key to hash tables. protected: TileIndex dest_tile; @@ -127,10 +127,10 @@ template class CYapfFollowShipT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class). + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class). typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type. - typedef typename Node::Key Key; ///< key to hash tables. + typedef typename Types::NodeList::Item Node; ///< this will be our node type. + typedef typename Node::Key Key; ///< key to hash tables. protected: /** to access inherited path finder */ @@ -327,10 +327,10 @@ template class CYapfCostShipT { public: - typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class). + typedef typename Types::Tpf Tpf; ///< the pathfinder class (derived from THIS class). typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< this will be our node type. - typedef typename Node::Key Key; ///< key to hash tables. + typedef typename Types::NodeList::Item Node; ///< this will be our node type. + typedef typename Node::Key Key; ///< key to hash tables. /** to access inherited path finder */ Tpf &Yapf() diff --git a/src/pathfinder/yapf/yapf_ship_regions.cpp b/src/pathfinder/yapf/yapf_ship_regions.cpp index b09a6d679c..78fa801e9f 100644 --- a/src/pathfinder/yapf/yapf_ship_regions.cpp +++ b/src/pathfinder/yapf/yapf_ship_regions.cpp @@ -89,9 +89,9 @@ template class CYapfOriginRegionT { public: - typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). - typedef typename Types::NodeList::Titem Node; ///< This will be our node type. - typedef typename Node::Key Key; ///< Key to hash tables. + typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). + typedef typename Types::NodeList::Item Node; ///< This will be our node type. + typedef typename Node::Key Key; ///< Key to hash tables. protected: inline Tpf &Yapf() { return *static_cast(this); } @@ -126,9 +126,9 @@ template class CYapfDestinationRegionT { public: - typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). - typedef typename Types::NodeList::Titem Node; ///< This will be our node type. - typedef typename Node::Key Key; ///< Key to hash tables. + typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). + typedef typename Types::NodeList::Item Node; ///< This will be our node type. + typedef typename Node::Key Key; ///< Key to hash tables. protected: Key dest; @@ -166,10 +166,10 @@ template class CYapfFollowRegionT { public: - typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). + typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< This will be our node type. - typedef typename Node::Key Key; ///< Key to hash tables. + typedef typename Types::NodeList::Item Node; ///< This will be our node type. + typedef typename Node::Key Key; ///< Key to hash tables. protected: inline Tpf &Yapf() { return *static_cast(this); } @@ -238,10 +238,10 @@ template class CYapfCostRegionT { public: - typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). + typedef typename Types::Tpf Tpf; ///< The pathfinder class (derived from THIS class). typedef typename Types::TrackFollower TrackFollower; - typedef typename Types::NodeList::Titem Node; ///< This will be our node type. - typedef typename Node::Key Key; ///< Key to hash tables. + typedef typename Types::NodeList::Item Node; ///< This will be our node type. + typedef typename Node::Key Key; ///< Key to hash tables. protected: /** To access inherited path finder. */ @@ -293,7 +293,7 @@ struct CYapfRegion_TypesT typedef CYapfCostRegionT PfCost; ///< Cost provider. }; -typedef CNodeList_HashTableT, 12, 12> CRegionNodeListWater; +typedef NodeList, 12, 12> CRegionNodeListWater; struct CYapfRegionWater : CYapfT> {