diff options
author | rubidium <rubidium@openttd.org> | 2009-01-03 13:20:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-01-03 13:20:32 +0000 |
commit | abd3b8e0d713c01a27e0a4b448b1dd0d8a352311 (patch) | |
tree | e4a2ef1a719a0162a16a31302d400045fa683b38 /src/vehicle_base.h | |
parent | f08fe262af89f4330bfaf961ee37f3d45fbebf13 (diff) | |
download | openttd-abd3b8e0d713c01a27e0a4b448b1dd0d8a352311.tar.xz |
(svn r14801) -Codechange: don't reference Vehicle::num_orders directly but through a method GetNumOrders() (PhilSophus)
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r-- | src/vehicle_base.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h index 15f2df1aa..e49219ddb 100644 --- a/src/vehicle_base.h +++ b/src/vehicle_base.h @@ -512,6 +512,12 @@ public: */ inline bool IsOrderListShared() const { return this->previous_shared != NULL || this->next_shared != NULL; }; + /** + * Get the number of orders this vehicle has. + * @return the number of orders this vehicle has. + */ + inline VehicleOrderID GetNumOrders() const { return this->num_orders; } + /** * Copy certain configurations and statistics of a vehicle after successful autoreplace/renew * The function shall copy everything that cannot be copied by a command (like orders / group etc), |