order.h
changeset 1043 123072ba6ced
parent 1024 9b06b01490a4
child 1053 dfb5243315f1
equal deleted inserted replaced
1042:b613cc1c2226 1043:123072ba6ced
    72 
    72 
    73 #define FOR_VEHICLE_ORDERS(v, order) for (order = v->orders; order != NULL; order = order->next)
    73 #define FOR_VEHICLE_ORDERS(v, order) for (order = v->orders; order != NULL; order = order->next)
    74 
    74 
    75 static inline bool HasOrderPoolFree(uint amount)
    75 static inline bool HasOrderPoolFree(uint amount)
    76 {
    76 {
    77 	Order *order;
    77 	const Order *order;
    78 
    78 
    79 	FOR_ALL_ORDERS(order)
    79 	FOR_ALL_ORDERS(order)
    80 		if (order->type == OT_NOTHING)
    80 		if (order->type == OT_NOTHING)
    81 			if (--amount == 0)
    81 			if (--amount == 0)
    82 				return true;
    82 				return true;