summaryrefslogtreecommitdiff
path: root/src/order_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-05 21:45:05 +0000
committerrubidium <rubidium@openttd.org>2008-04-05 21:45:05 +0000
commit56e63a60447beeae0cc541191ea77f06e237b40a (patch)
treeca0674872d745ca4b4441c43624b6a991303017f /src/order_base.h
parent669b4bc609ee720ee7ed6cdbe6d0a5fed973c4c3 (diff)
downloadopenttd-56e63a60447beeae0cc541191ea77f06e237b40a.tar.xz
(svn r12583) -Codechange: make AssignOrder a class function of order.
Diffstat (limited to 'src/order_base.h')
-rw-r--r--src/order_base.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/order_base.h b/src/order_base.h
index d2fc9a98d..267da1321 100644
--- a/src/order_base.h
+++ b/src/order_base.h
@@ -53,6 +53,19 @@ struct Order : PoolItem<Order, OrderID, &_Order_pool> {
void FreeChain();
bool ShouldStopAtStation(const Vehicle *v, StationID station) const;
+
+ /**
+ * Assign the given order to this one.
+ * @param other the data to copy (except next pointer).
+ */
+ void AssignOrder(const Order &other);
+
+ /**
+ * Does this order have the same type, flags and destination?
+ * @param other the second order to compare to.
+ * @return true if the type, flags and destination match.
+ */
+ bool Equals(const Order &other) const;
};
static inline VehicleOrderID GetMaxOrderIndex()
@@ -80,6 +93,5 @@ static inline VehicleOrderID GetNumOrders()
uint32 PackOrder(const Order *order);
Order UnpackOrder(uint32 packed);
Order UnpackOldOrder(uint16 packed);
-void AssignOrder(Order *order, Order data);
#endif /* ORDER_H */