summaryrefslogtreecommitdiff
path: root/src/order_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-07 19:18:56 +0000
committerrubidium <rubidium@openttd.org>2008-04-07 19:18:56 +0000
commitcf250390c5bd2a4980197b1801630fac80944fd3 (patch)
tree107ad3411123e54f1869835417c772620cee3502 /src/order_base.h
parent0017149c33d8607ca25b154c28cd94e8221e911f (diff)
downloadopenttd-cf250390c5bd2a4980197b1801630fac80944fd3.tar.xz
(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.
Diffstat (limited to 'src/order_base.h')
-rw-r--r--src/order_base.h10
1 files changed, 5 insertions, 5 deletions
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;