equal
deleted
inserted
replaced
169 static inline bool HasOrderPoolFree(uint amount) |
169 static inline bool HasOrderPoolFree(uint amount) |
170 { |
170 { |
171 const Order *order; |
171 const Order *order; |
172 |
172 |
173 /* There is always room if not all blocks in the pool are reserved */ |
173 /* There is always room if not all blocks in the pool are reserved */ |
174 if (_Order_pool.current_blocks < _Order_pool.max_blocks) |
174 if (_Order_pool.CanAllocateMoreBlocks()) return true; |
175 return true; |
175 |
176 |
176 FOR_ALL_ORDERS(order) if (!order->IsValid() && --amount == 0) return true; |
177 FOR_ALL_ORDERS(order) |
|
178 if (!order->IsValid()) |
|
179 if (--amount == 0) |
|
180 return true; |
|
181 |
177 |
182 return false; |
178 return false; |
183 } |
179 } |
184 |
180 |
185 |
181 |