summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorfonsinchen <fonsinchen@openttd.org>2014-02-10 20:13:07 +0000
committerfonsinchen <fonsinchen@openttd.org>2014-02-10 20:13:07 +0000
commite37656f2e58ca802f0df5eef42b35e4015b58d86 (patch)
treed1e7133b7030a5d130d5755f2791af0eb7607ef9 /src/core
parent82ece7db12f4cd7d56ddbe3414a0553f636d4259 (diff)
downloadopenttd-e37656f2e58ca802f0df5eef42b35e4015b58d86.tar.xz
(svn r26331) -Fix: some inconsistencies regarding link graph (job) IDs.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/pool_type.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp
index 74ade5790..25067ae27 100644
--- a/src/core/pool_type.hpp
+++ b/src/core/pool_type.hpp
@@ -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