(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)

This commit is contained in:
smatz
2009-05-16 23:34:14 +00:00
parent f9b692c921
commit d495dc5dbc
116 changed files with 645 additions and 637 deletions

View File

@@ -63,7 +63,7 @@ CommandCost CmdStartStopVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1,
if (!IsValidVehicleID(p1)) return CMD_ERROR;
Vehicle *v = GetVehicle(p1);
Vehicle *v = Vehicle::Get(p1);
if (!CheckOwnership(v->owner)) return CMD_ERROR;
if (!v->IsPrimaryVehicle()) return CMD_ERROR;
@@ -336,7 +336,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
if (!IsValidVehicleID(p1)) return CMD_ERROR;
Vehicle *v = GetVehicle(p1);
Vehicle *v = Vehicle::Get(p1);
Vehicle *v_front = v;
Vehicle *w = NULL;
Vehicle *w_front = NULL;
@@ -382,7 +382,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
total_cost.AddCost(cost);
if (flags & DC_EXEC) {
w = GetVehicle(_new_vehicle_id);
w = Vehicle::Get(_new_vehicle_id);
if (v->type == VEH_TRAIN && HasBit(v->u.rail.flags, VRF_REVERSE_DIRECTION)) {
SetBit(w->u.rail.flags, VRF_REVERSE_DIRECTION);
@@ -447,7 +447,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
break;
}
} else {
const Engine *e = GetEngine(v->engine_type);
const Engine *e = Engine::Get(v->engine_type);
CargoID initial_cargo = (e->CanCarryCargo() ? e->GetDefaultCargoType() : (CargoID)CT_INVALID);
if (v->cargo_type != initial_cargo && initial_cargo != CT_INVALID) {
@@ -534,7 +534,7 @@ CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
{
if (!IsValidVehicleID(p1)) return CMD_ERROR;
Vehicle *v = GetVehicle(p1);
Vehicle *v = Vehicle::Get(p1);
if (!CheckOwnership(v->owner)) return CMD_ERROR;
bool reset = StrEmpty(text);
@@ -567,7 +567,7 @@ CommandCost CmdChangeServiceInt(TileIndex tile, DoCommandFlag flags, uint32 p1,
if (serv_int != p2 || !IsValidVehicleID(p1)) return CMD_ERROR;
Vehicle *v = GetVehicle(p1);
Vehicle *v = Vehicle::Get(p1);
if (!CheckOwnership(v->owner)) return CMD_ERROR;