From 56e63a60447beeae0cc541191ea77f06e237b40a Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 5 Apr 2008 21:45:05 +0000 Subject: (svn r12583) -Codechange: make AssignOrder a class function of order. --- src/order_base.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/order_base.h') 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 { 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 */ -- cgit v1.2.3-54-g00ecf