summaryrefslogtreecommitdiff
path: root/src/vehicle_base.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-02-02 02:45:09 +0000
committerbelugas <belugas@openttd.org>2008-02-02 02:45:09 +0000
commit33e63a3adc5383b704631f5aa0aca9aaf3245b21 (patch)
tree97531e94001ab02ac6a3777261f49f77429da54c /src/vehicle_base.h
parent09ce7f76e963a5a368eb98dcc5f28dfe476eafea (diff)
downloadopenttd-33e63a3adc5383b704631f5aa0aca9aaf3245b21.tar.xz
(svn r12040) -Codechange: Change IsOrderListShared from a simple function to a class member(MagicBuzz).
Diffstat (limited to 'src/vehicle_base.h')
-rw-r--r--src/vehicle_base.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vehicle_base.h b/src/vehicle_base.h
index cce77aa4d..a19b80dfb 100644
--- a/src/vehicle_base.h
+++ b/src/vehicle_base.h
@@ -461,6 +461,13 @@ public:
* @return the first vehicle of the chain.
*/
inline Vehicle *First() const { return this->first; }
+
+ /**
+ * Check if we share our orders with another vehicle.
+ * This is done by checking the previous and next pointers in the shared chain.
+ * @return true if there are other vehicles sharing the same order
+ */
+ inline bool IsOrderListShared() const { return this->next_shared != NULL || this->prev_shared != NULL; };
};
/**