From fc4f6dcfb1a31568a988f217cfa3bed194351318 Mon Sep 17 00:00:00 2001 From: belugas Date: Sat, 2 Feb 2008 02:45:09 +0000 Subject: (svn r12040) -Codechange: Change IsOrderListShared from a simple function to a class member(MagicBuzz). --- src/vehicle_base.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/vehicle_base.h') 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; }; }; /** -- cgit v1.2.3-54-g00ecf