Changeset - r18276:3f1bc1818b49
[Not reviewed]
master
0 1 0
michi_cc - 13 years ago 2011-11-05 22:41:04
michi_cc@openttd.org
(svn r23122) -Fix (23120): Silence GCC warning.
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/ai/api/ai_order.cpp
Show inline comments
 
@@ -329,25 +329,25 @@ static const Order *ResolveOrder(Vehicle
 
	if (!IsGotoStationOrder(vehicle_id, order_position)) return STOPLOCATION_INVALID;
 

	
 
	const Order *order = ::ResolveOrder(vehicle_id, order_position);
 
	return (AIOrder::StopLocation)order->GetStopLocation();
 
}
 

	
 
/* static */ CargoID AIOrder::GetOrderRefit(VehicleID vehicle_id, OrderPosition order_position)
 
{
 
	if (!IsValidVehicleOrder(vehicle_id, order_position)) return CT_NO_REFIT;
 
	if (order_position != ORDER_CURRENT && !IsGotoStationOrder(vehicle_id, order_position) && !IsGotoDepotOrder(vehicle_id, order_position)) return CT_NO_REFIT;
 

	
 
	const Order *order = ::ResolveOrder(vehicle_id, order_position);
 
	return order->IsRefit() ? order->GetRefitCargo() : CT_NO_REFIT;
 
	return order->IsRefit() ? order->GetRefitCargo() : (CargoID)CT_NO_REFIT;
 
}
 

	
 
/* static */ bool AIOrder::SetOrderJumpTo(VehicleID vehicle_id, OrderPosition order_position, OrderPosition jump_to)
 
{
 
	EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, order_position));
 
	EnforcePrecondition(false, order_position != ORDER_CURRENT && IsConditionalOrder(vehicle_id, order_position));
 
	EnforcePrecondition(false, IsValidVehicleOrder(vehicle_id, jump_to) && jump_to != ORDER_CURRENT);
 

	
 
	return AIObject::DoCommand(0, vehicle_id | (order_position << 20), MOF_COND_DESTINATION | (jump_to << 4), CMD_MODIFY_ORDER);
 
}
 

	
 
/* static */ bool AIOrder::SetOrderCondition(VehicleID vehicle_id, OrderPosition order_position, OrderCondition condition)
0 comments (0 inline, 0 general)