summaryrefslogtreecommitdiff
path: root/src/order_base.h
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-05-16 23:44:36 +0000
committersmatz <smatz@openttd.org>2009-05-16 23:44:36 +0000
commited1e54bd84074412ea9f273b7cd86aed42d844ce (patch)
tree4a5ab5dbd304f9a53f8f0065bc6965b1680ded78 /src/order_base.h
parent6221d74644922ea4bbba3ed9cd8bbec42398f77b (diff)
downloadopenttd-ed1e54bd84074412ea9f273b7cd86aed42d844ce.tar.xz
(svn r16326) -Codechange: replace GetPoolItemPoolSize() by PoolItem::GetPoolSize()
Diffstat (limited to 'src/order_base.h')
-rw-r--r--src/order_base.h10
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 */