18 #ifndef B2_STACK_QUEUE
19 #define B2_STACK_QUEUE
21 #include <Box2D/Common/b2StackAllocator.h>
31 m_allocator = allocator;
32 m_buffer = (T*) m_allocator->Allocate(
sizeof(T) * capacity);
35 m_end = m_buffer + capacity;
40 m_allocator->Free(m_buffer);
47 void Push(
const T &item)
51 ptrdiff_t diff = m_front - m_buffer;
52 for (T *it = m_front; it < m_back; ++it)
68 b2Assert(m_front < m_back);
74 return m_front >= m_back;
77 const T &Front()
const
Definition: b2StackAllocator.h:37
Definition: b2StackQueue.h:24