summaryrefslogtreecommitdiff
path: root/src/ground_vehicle.cpp
diff options
context:
space:
mode:
authorCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:44:22 +0000
committerCharles Pigott <charlespigott@googlemail.com>2020-12-27 10:55:42 +0000
commit860c270c73048b4930ac8cbebcd60be746eb9782 (patch)
treea88a8acb208cf426ae8fac05dda202c57b59426a /src/ground_vehicle.cpp
parent395a5d9991b500c681ff384f8d3b4e153e687abb (diff)
downloadopenttd-860c270c73048b4930ac8cbebcd60be746eb9782.tar.xz
Codechange: Replace assert_compile macro with static_assert
Diffstat (limited to 'src/ground_vehicle.cpp')
-rw-r--r--src/ground_vehicle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ground_vehicle.cpp b/src/ground_vehicle.cpp
index 74095fc57..0f1915c96 100644
--- a/src/ground_vehicle.cpp
+++ b/src/ground_vehicle.cpp
@@ -191,8 +191,8 @@ bool GroundVehicle<T, Type>::IsChainInDepot() const
{
const T *v = this->First();
/* Is the front engine stationary in the depot? */
- assert_compile((int)TRANSPORT_RAIL == (int)VEH_TRAIN);
- assert_compile((int)TRANSPORT_ROAD == (int)VEH_ROAD);
+ static_assert((int)TRANSPORT_RAIL == (int)VEH_TRAIN);
+ static_assert((int)TRANSPORT_ROAD == (int)VEH_ROAD);
if (!IsDepotTypeTile(v->tile, (TransportType)Type) || v->cur_speed != 0) return false;
/* Check whether the rest is also already trying to enter the depot. */