diff options
Diffstat (limited to 'src/order_base.h')
-rw-r--r-- | src/order_base.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/order_base.h b/src/order_base.h index b743a26fa..1c6566194 100644 --- a/src/order_base.h +++ b/src/order_base.h @@ -250,12 +250,12 @@ static inline VehicleOrderID GetMaxOrderIndex() * _really_ returns the highest index. Now it just returns * the next safe value we are sure about everything is below. */ - return GetOrderPoolSize() - 1; + return Order::GetPoolSize() - 1; } static inline VehicleOrderID GetNumOrders() { - return GetOrderPoolSize(); + return Order::GetPoolSize(); } /** Shared order list linking together the linked list of orders and the list @@ -423,17 +423,17 @@ public: static inline bool IsValidOrderListID(uint index) { - return index < GetOrderListPoolSize() && OrderList::Get(index)->IsValid(); + return index < OrderList::GetPoolSize() && OrderList::Get(index)->IsValid(); } -#define FOR_ALL_ORDERS_FROM(order, start) for (order = Order::Get(start); order != NULL; order = (order->index + 1U < GetOrderPoolSize()) ? Order::Get(order->index + 1U) : NULL) if (order->IsValid()) +#define FOR_ALL_ORDERS_FROM(order, start) for (order = Order::Get(start); order != NULL; order = (order->index + 1U < Order::GetPoolSize()) ? Order::Get(order->index + 1U) : NULL) if (order->IsValid()) #define FOR_ALL_ORDERS(order) FOR_ALL_ORDERS_FROM(order, 0) #define FOR_VEHICLE_ORDERS(v, order) for (order = (v->orders.list == NULL) ? NULL : v->orders.list->GetFirstOrder(); order != NULL; order = order->next) -#define FOR_ALL_ORDER_LISTS_FROM(ol, start) for (ol = OrderList::Get(start); ol != NULL; ol = (ol->index + 1U < GetOrderListPoolSize()) ? OrderList::Get(ol->index + 1U) : NULL) if (ol->IsValid()) +#define FOR_ALL_ORDER_LISTS_FROM(ol, start) for (ol = OrderList::Get(start); ol != NULL; ol = (ol->index + 1U < OrderList::GetPoolSize()) ? OrderList::Get(ol->index + 1U) : NULL) if (ol->IsValid()) #define FOR_ALL_ORDER_LISTS(ol) FOR_ALL_ORDER_LISTS_FROM(ol, 0) #endif /* ORDER_H */ |