From a92bf491916dca0861fafb4db93407758cf79b91 Mon Sep 17 00:00:00 2001 From: frosch Date: Tue, 11 Feb 2014 20:34:48 +0000 Subject: [PATCH] (svn r26333) -Fix: Compilation without static_assert. --- src/cargopacket.cpp | 4 ++-- src/core/pool_type.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cargopacket.cpp b/src/cargopacket.cpp index 3eea10a5b5..67d00554b6 100644 --- a/src/cargopacket.cpp +++ b/src/cargopacket.cpp @@ -557,8 +557,8 @@ void VehicleCargoList::InvalidateCache() template uint VehicleCargoList::Reassign(uint max_move, TileOrStationID) { - assert_compile(Tfrom != MTA_TRANSFER && Tto != MTA_TRANSFER); - assert_compile(Tfrom - Tto == 1 || Tto - Tfrom == 1); + assert_tcompile(Tfrom != MTA_TRANSFER && Tto != MTA_TRANSFER); + assert_tcompile(Tfrom - Tto == 1 || Tto - Tfrom == 1); max_move = min(this->action_counts[Tfrom], max_move); this->action_counts[Tfrom] -= max_move; this->action_counts[Tto] += max_move; diff --git a/src/core/pool_type.hpp b/src/core/pool_type.hpp index 25067ae272..4d20ed1abb 100644 --- a/src/core/pool_type.hpp +++ b/src/core/pool_type.hpp @@ -82,7 +82,7 @@ private: template struct Pool : PoolBase { /* Ensure Tmax_size is within the bounds of Tindex. */ - assert_compile((Tmax_size - 1) >> 8 * sizeof(Tindex) == 0); + assert_compile((uint64)(Tmax_size - 1) >> 8 * sizeof(Tindex) == 0); static const size_t MAX_SIZE = Tmax_size; ///< Make template parameter accessible from outside