summaryrefslogtreecommitdiff
path: root/src/order_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-12-11 13:48:30 +0000
committerrubidium <rubidium@openttd.org>2010-12-11 13:48:30 +0000
commit23369337c1af635f479c1d1541601742f6285dd2 (patch)
treedb1efa572b852449fcc8001061278338d0b199fc /src/order_cmd.cpp
parentfc7082590551a36ca7606f61f0ffced27b3194ac (diff)
downloadopenttd-23369337c1af635f479c1d1541601742f6285dd2.tar.xz
(svn r21466) -Codechange: make VehicleHasDepotOrders a function of Vehicle.
Diffstat (limited to 'src/order_cmd.cpp')
-rw-r--r--src/order_cmd.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index d02522cc6..13bdf2d8c 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1445,17 +1445,14 @@ void RemoveOrderFromAllVehicles(OrderType type, DestinationID destination)
}
/**
- *
- * Checks if a vehicle has a GOTO_DEPOT in his order list
- *
- * @return True if this is true (lol ;))
- *
+ * Checks if a vehicle has a depot in its order list.
+ * @return True iff at least one order is a depot order.
*/
-bool VehicleHasDepotOrders(const Vehicle *v)
+bool Vehicle::HasDepotOrder() const
{
const Order *order;
- FOR_VEHICLE_ORDERS(v, order) {
+ FOR_VEHICLE_ORDERS(this, order) {
if (order->IsType(OT_GOTO_DEPOT)) return true;
}