(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
This commit is contained in:
tron
2006-09-03 08:25:27 +00:00
parent 302772883c
commit 1c21c645ae
21 changed files with 173 additions and 187 deletions

View File

@@ -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;