From f1cd7ef5ee9d0862622d53a4c348d6f9debd500e Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 7 Apr 2008 19:18:56 +0000 Subject: (svn r12615) -Codechange: rename some enums related to depot orders to make it more clear that they are no loading/unloading flags. Also add more type strictness. --- src/order_base.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/order_base.h') diff --git a/src/order_base.h b/src/order_base.h index 2e9ac6fc6..f6f2dc396 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -87,7 +87,7 @@ public: * @param cargo the cargo type to change to. * @param subtype the subtype to change to. */ - void MakeGoToDepot(DepotID destination, bool order, CargoID cargo = CT_NO_REFIT, byte subtype = 0); + void MakeGoToDepot(DepotID destination, OrderDepotTypeFlags order, CargoID cargo = CT_NO_REFIT, byte subtype = 0); /** * Makes this order a Go To Waypoint order. @@ -167,9 +167,9 @@ public: /** Where must we stop? */ OrderNonStopFlags GetNonStopType() const; /** What caused us going to the depot? */ - inline byte GetDepotOrderType() const { return this->flags; } + inline OrderDepotTypeFlags GetDepotOrderType() const { return (OrderDepotTypeFlags)this->flags; } /** What are we going to do when in the depot. */ - inline byte GetDepotActionType() const { return this->flags; } + inline OrderDepotActionFlags GetDepotActionType() const { return (OrderDepotActionFlags)this->flags; } /** Set how the consist must be loaded. */ inline void SetLoadType(byte load_type) { SB(this->flags, 2, 1, !!load_type); } @@ -178,9 +178,9 @@ public: /** Set whether we must stop at stations or not. */ inline void SetNonStopType(OrderNonStopFlags non_stop_type) { SB(this->flags, 3, 1, !!non_stop_type); } /** Set the cause to go to the depot. */ - inline void SetDepotOrderType(byte depot_order_type) { this->flags = depot_order_type; } + inline void SetDepotOrderType(OrderDepotTypeFlags depot_order_type) { this->flags = depot_order_type; } /** Set what we are going to do in the depot. */ - inline void SetDepotActionType(byte depot_service_type) { this->flags = depot_service_type; } + inline void SetDepotActionType(OrderDepotActionFlags depot_service_type) { this->flags = depot_service_type; } bool ShouldStopAtStation(const Vehicle *v, StationID station) const; -- cgit v1.2.3-54-g00ecf