Replace various uses of std::set/map with btree containers.
This commit is contained in:
@@ -3,11 +3,12 @@
|
||||
#include "../stdafx.h"
|
||||
#include "../core/math_func.hpp"
|
||||
#include "mcf.h"
|
||||
#include "../3rdparty/cpp-btree/btree_map.h"
|
||||
#include <set>
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
typedef std::map<NodeID, Path *> PathViaMap;
|
||||
typedef btree::btree_map<NodeID, Path *> PathViaMap;
|
||||
|
||||
/**
|
||||
* This is a wrapper around Tannotation* which also stores a cache of GetAnnotation() and GetNode()
|
||||
|
@@ -14,9 +14,9 @@
|
||||
|
||||
#include "../cargo_type.h"
|
||||
#include "../vehicle_base.h"
|
||||
#include "../3rdparty/cpp-btree/btree_set.h"
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
||||
/**
|
||||
* Utility to refresh links a consist will visit.
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
* Default constructor should not be called but has to be visible for
|
||||
* usage in std::set.
|
||||
*/
|
||||
Hop() {NOT_REACHED();}
|
||||
Hop() {}
|
||||
|
||||
/**
|
||||
* Real constructor, only use this one.
|
||||
@@ -80,7 +80,7 @@ protected:
|
||||
};
|
||||
|
||||
typedef std::vector<RefitDesc> RefitList;
|
||||
typedef std::set<Hop> HopSet;
|
||||
typedef btree::btree_set<Hop> HopSet;
|
||||
|
||||
Vehicle *vehicle; ///< Vehicle for which the links should be refreshed.
|
||||
uint capacities[NUM_CARGO]; ///< Current added capacities per cargo ID in the consist.
|
||||
|
Reference in New Issue
Block a user