Fix various whitespace and style issues.

This commit is contained in:
Jonathan G Rennison
2015-08-26 22:49:08 +01:00
parent 218758fc86
commit ea5c33029b
2 changed files with 51 additions and 49 deletions

View File

@@ -124,10 +124,9 @@ void Order::MakeLoading(bool ordered)
/**
* Makes this order a Leave Station order.
*/
bool Order::UpdateJumpCounter(byte percent)
{
if(this->jump_counter >= 0) {
if (this->jump_counter >= 0) {
this->jump_counter += (percent - 100);
return true;
}
@@ -961,9 +960,7 @@ static CargoID GetFirstValidCargo()
if (CargoSpec::Get(i)->IsValid()) return i;
}
/* No cargos defined -> 'Houston, we have a problem!' */
assert(0);
/* Return something to avoid compiler warning */
return 0;
NOT_REACHED();
}
/**
@@ -2014,7 +2011,7 @@ VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v)
}
case OCV_PERCENT: {
/* get a non-const reference to the current order */
Order *ord = (Order *)order;
Order *ord = const_cast<Order *>(order);
skip_order = ord->UpdateJumpCounter((byte)value);
break;
}