Use btree_set for IndustryList and StationList
This commit is contained in:
@@ -20,10 +20,10 @@
|
||||
#include "linkgraph/linkgraph_type.h"
|
||||
#include "newgrf_storage.h"
|
||||
#include "3rdparty/cpp-btree/btree_map.h"
|
||||
#include "3rdparty/cpp-btree/btree_set.h"
|
||||
#include "bitmap_type.h"
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
|
||||
typedef Pool<BaseStation, StationID, 32, 64000> StationPool;
|
||||
extern StationPool _station_pool;
|
||||
@@ -451,7 +451,7 @@ struct IndustryCompare {
|
||||
bool operator() (const Industry *lhs, const Industry *rhs) const;
|
||||
};
|
||||
|
||||
typedef std::set<Industry *, IndustryCompare> IndustryList;
|
||||
typedef btree::btree_set<Industry *, IndustryCompare> IndustryList;
|
||||
|
||||
/** Station data structure */
|
||||
struct Station FINAL : SpecializedStation<Station, false> {
|
||||
|
@@ -4068,7 +4068,7 @@ void FindStationsAroundTiles(const TileArea &location, StationList *stations, bo
|
||||
uint x = TileX(location.tile);
|
||||
uint y = TileY(location.tile);
|
||||
|
||||
std::set<StationID> seen_stations;
|
||||
btree::btree_set<StationID> seen_stations;
|
||||
|
||||
/* Scan an area around the building covering the maximum possible station
|
||||
* to find the possible nearby stations. */
|
||||
|
@@ -14,7 +14,7 @@
|
||||
|
||||
#include "core/smallstack_type.hpp"
|
||||
#include "tilearea_type.h"
|
||||
#include <set>
|
||||
#include "3rdparty/cpp-btree/btree_set.h"
|
||||
|
||||
typedef uint16 StationID;
|
||||
typedef uint16 RoadStopID;
|
||||
@@ -97,7 +97,7 @@ struct StationCompare {
|
||||
};
|
||||
|
||||
/** List of stations */
|
||||
typedef std::set<Station *, StationCompare> StationList;
|
||||
typedef btree::btree_set<Station *, StationCompare> StationList;
|
||||
|
||||
/**
|
||||
* Structure contains cached list of stations nearby. The list
|
||||
|
Reference in New Issue
Block a user