summaryrefslogtreecommitdiff
path: root/order.h
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-09-03 08:25:27 +0000
committertron <tron@openttd.org>2006-09-03 08:25:27 +0000
commit1c21c645ae04601cd3711b37e6541d807cb727a7 (patch)
tree79ebec494a87cd0b8e16e577740868f5bf90a7d2 /order.h
parent302772883ce9dd965ca6dfe9ade85530c6de8210 (diff)
downloadopenttd-1c21c645ae04601cd3711b37e6541d807cb727a7.tar.xz
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
Diffstat (limited to 'order.h')
-rw-r--r--order.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/order.h b/order.h
index 99c606a89..1763f59e0 100644
--- a/order.h
+++ b/order.h
@@ -177,7 +177,7 @@ static inline bool IsOrderPoolFull(void)
static inline uint32 PackOrder(const Order *order)
{
- return order->dest.station << 16 | order->flags << 8 | order->type;
+ return order->dest << 16 | order->flags << 8 | order->type;
}
static inline Order UnpackOrder(uint32 packed)
@@ -185,7 +185,7 @@ static inline Order UnpackOrder(uint32 packed)
Order order;
order.type = (OrderType)GB(packed, 0, 8);
order.flags = GB(packed, 8, 8);
- order.dest.station = GB(packed, 16, 16);
+ order.dest = GB(packed, 16, 16);
order.next = NULL;
order.index = 0; // avoid compiler warning
return order;