summaryrefslogtreecommitdiff
path: root/src/order_type.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-01-04 15:53:43 +0000
committerrubidium <rubidium@openttd.org>2009-01-04 15:53:43 +0000
commit8252bc59e3fbd49fd9406d5b7b3b8a22193af28d (patch)
tree477f1fe69eee3708626efee298ca9d92dac76b91 /src/order_type.h
parent30884396e69ea4ee7a00b1bc2ae9ecec9b5f0b6b (diff)
downloadopenttd-8252bc59e3fbd49fd9406d5b7b3b8a22193af28d.tar.xz
(svn r14830) -Fix [FS#2495]: overflow of number of orders per vehicle (based on patch by Swallow)
Diffstat (limited to 'src/order_type.h')
-rw-r--r--src/order_type.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/order_type.h b/src/order_type.h
index 55653b825..0a43dc8f7 100644
--- a/src/order_type.h
+++ b/src/order_type.h
@@ -12,10 +12,12 @@ typedef uint16 OrderID;
typedef uint16 OrderListID;
typedef uint16 DestinationID;
-enum {
- INVALID_VEH_ORDER_ID = 0xFF,
-};
+/** Invalid vehicle order index (sentinel) */
+static const VehicleOrderID INVALID_VEH_ORDER_ID = 0xFF;
+/** Last valid VehicleOrderID. */
+static const VehicleOrderID MAX_VEH_ORDER_ID = INVALID_VEH_ORDER_ID - 1;
+/** Invalid order (sentinel) */
static const OrderID INVALID_ORDER = 0xFFFF;
/* Order types */