MCPcopy Create free account
hub / github.com/9chu/LuaSTGPlus / Push

Method Push

LuaSTGPlus/CirularQueue.hpp:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22 size_t Size() { return m_Count; }
23 size_t Max() { return MaxSize - 1; }
24 bool Push(T val)
25 {
26 if (IsFull())
27 return false;
28 else
29 {
30 m_Data[m_Rear] = val;
31 m_Rear = (m_Rear + 1) % MaxSize;
32 ++m_Count;
33 return true;
34 }
35 }
36 bool Pop(T& out)
37 {
38 if (IsEmpty())

Callers 1

UpdateMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected