(svn r26331) -Fix: some inconsistencies regarding link graph (job) IDs.

This commit is contained in:
fonsinchen 2014-02-10 20:13:07 +00:00
parent 82ece7db12
commit e37656f2e5
4 changed files with 6 additions and 3 deletions

View File

@ -81,6 +81,9 @@ private:
*/
template <class Titem, typename Tindex, size_t Tgrowth_step, size_t Tmax_size, PoolType Tpool_type = PT_NORMAL, bool Tcache = false, bool Tzero = true>
struct Pool : PoolBase {
/* Ensure Tmax_size is within the bounds of Tindex. */
assert_compile((Tmax_size - 1) >> 8 * sizeof(Tindex) == 0);
static const size_t MAX_SIZE = Tmax_size; ///< Make template parameter accessible from outside
const char * const name; ///< Name of this pool

View File

@ -27,7 +27,7 @@ class LinkGraph;
* Type of the pool for link graph components. Each station can be in at up to
* 32 link graphs. So we allow for plenty of them to be created.
*/
typedef Pool<LinkGraph, LinkGraphID, 32, 0xFFFFFF> LinkGraphPool;
typedef Pool<LinkGraph, LinkGraphID, 32, 0xFFFF> LinkGraphPool;
/** The actual pool with link graphs. */
extern LinkGraphPool _link_graph_pool;

View File

@ -16,7 +16,7 @@ typedef uint16 LinkGraphID;
static const LinkGraphID INVALID_LINK_GRAPH = UINT16_MAX;
typedef uint16 LinkGraphJobID;
static const LinkGraphID INVALID_LIN_KGRAPH_JOB = UINT16_MAX;
static const LinkGraphID INVALID_LINK_GRAPH_JOB = UINT16_MAX;
typedef uint16 NodeID;
static const NodeID INVALID_NODE = UINT16_MAX;

View File

@ -21,7 +21,7 @@ class Path;
typedef std::list<Path *> PathList;
/** Type of the pool for link graph jobs. */
typedef Pool<LinkGraphJob, LinkGraphJobID, 32, 0xFFFFFF> LinkGraphJobPool;
typedef Pool<LinkGraphJob, LinkGraphJobID, 32, 0xFFFF> LinkGraphJobPool;
/** The actual pool with link graph jobs. */
extern LinkGraphJobPool _link_graph_job_pool;