1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-22 05:59:10 +00:00

(svn r19654) -Codechange: Use Extract<> in more places.

This commit is contained in:
frosch
2010-04-17 13:31:41 +00:00
parent 184fa43df2
commit 75d4bc947d
24 changed files with 87 additions and 63 deletions

View File

@@ -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;