summaryrefslogtreecommitdiff
path: root/src/order_base.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-04-07 20:03:46 +0000
committerrubidium <rubidium@openttd.org>2008-04-07 20:03:46 +0000
commit973997e896aeaaf36780abc3c51b1c115cec0535 (patch)
tree6b2bd1bb1a800edf7ded9987b1d3796b6f33a7c3 /src/order_base.h
parentf35612bd21374ee0aa77c0a79b6546922d43add0 (diff)
downloadopenttd-973997e896aeaaf36780abc3c51b1c115cec0535.tar.xz
(svn r12617) -Codechange: add type safety to the Order's load and unload types.
Diffstat (limited to 'src/order_base.h')
-rw-r--r--src/order_base.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/order_base.h b/src/order_base.h
index f6f2dc396..410a7f183 100644
--- a/src/order_base.h
+++ b/src/order_base.h
@@ -161,9 +161,9 @@ public:
void SetRefit(CargoID cargo, byte subtype = 0);
/** How must the consist be loaded? */
- inline byte GetLoadType() const { return this->flags & OFB_FULL_LOAD; }
+ inline OrderLoadFlags GetLoadType() const { return (OrderLoadFlags)(this->flags & OLFB_FULL_LOAD); }
/** How must the consist be unloaded? */
- inline byte GetUnloadType() const { return GB(this->flags, 0, 2); }
+ inline OrderUnloadFlags GetUnloadType() const { return (OrderUnloadFlags)GB(this->flags, 0, 2); }
/** Where must we stop? */
OrderNonStopFlags GetNonStopType() const;
/** What caused us going to the depot? */
@@ -172,9 +172,9 @@ public:
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); }
+ inline void SetLoadType(OrderLoadFlags load_type) { SB(this->flags, 2, 1, !!load_type); }
/** Set how the consist must be unloaded. */
- inline void SetUnloadType(byte unload_type) { SB(this->flags, 0, 2, unload_type); }
+ inline void SetUnloadType(OrderUnloadFlags unload_type) { SB(this->flags, 0, 2, unload_type); }
/** 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. */