summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-04-17 13:31:41 +0000
committerfrosch <frosch@openttd.org>2010-04-17 13:31:41 +0000
commit75d4bc947ddbb92ecf660d9a9858c854d5e34a15 (patch)
treeb218a672a78b894388373d2e700e6ad6ebe75b63 /src/order_cmd.cpp
parent184fa43df2e14c73162e641bc9bc83e403f069ed (diff)
downloadopenttd-75d4bc947ddbb92ecf660d9a9858c854d5e34a15.tar.xz
(svn r19654) -Codechange: Use Extract<> in more places.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index 7bbcbb86b..5f0fe4149 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -11,6 +11,7 @@
#include "stdafx.h"
#include "debug.h"
+#include "cmd_helper.h"
#include "command_func.h"
#include "company_func.h"
#include "news_func.h"
@@ -933,8 +934,8 @@ CommandCost CmdModifyOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
{
VehicleOrderID sel_ord = GB(p1, 16, 16); // XXX - automatically truncated to 8 bits.
VehicleID veh = GB(p1, 0, 16);
- ModifyOrderFlags mof = (ModifyOrderFlags)GB(p2, 0, 4);
- uint16 data = GB(p2, 4, 11);
+ ModifyOrderFlags mof = Extract<ModifyOrderFlags, 0, 4>(p2);
+ uint16 data = GB(p2, 4, 11);
if (mof >= MOF_END) return CMD_ERROR;