(svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed.
authorrubidium
Sat, 05 Apr 2008 23:46:01 +0000
changeset 9333 2bb0fdf0f3fc
parent 9332 2e120d0bd632
child 9334 db2f5161fcba
(svn r12585) -Fix (r12584): assumption that assertions were enabled during compilation/testing was flawed.
src/economy.cpp
src/vehicle.cpp
--- a/src/economy.cpp	Sat Apr 05 23:36:54 2008 +0000
+++ b/src/economy.cpp	Sat Apr 05 23:46:01 2008 +0000
@@ -1552,7 +1552,7 @@
  */
 static void LoadUnloadVehicle(Vehicle *v, int *cargo_left)
 {
-	assert(v->current_order.type == OT_LOADING);
+	assert(v->current_order.IsType(OT_LOADING));
 
 	/* We have not waited enough time till the next round of loading/unloading */
 	if (--v->load_unload_time_rem != 0) {
--- a/src/vehicle.cpp	Sat Apr 05 23:36:54 2008 +0000
+++ b/src/vehicle.cpp	Sat Apr 05 23:46:01 2008 +0000
@@ -3164,7 +3164,7 @@
 
 void Vehicle::LeaveStation()
 {
-	assert(current_order.type == OT_LOADING);
+	assert(current_order.IsType(OT_LOADING));
 
 	/* Only update the timetable if the vehicle was supposed to stop here. */
 	if (current_order.flags & OFB_NON_STOP) UpdateVehicleTimetable(this, false);