Compact groups stack container.
| 53 | |
| 54 | // Compact groups stack container. |
| 55 | struct GroupStackData |
| 56 | { |
| 57 | uint8 Count : 7; |
| 58 | uint8 SkipRecursion : 1; |
| 59 | uint8 Stack[15]; |
| 60 | |
| 61 | FORCE_INLINE void Push(ProfilerMemory::Groups group) |
| 62 | { |
| 63 | if (Count < ARRAY_COUNT(Stack)) |
| 64 | Count++; |
| 65 | Stack[Count - 1] = (uint8)group; |
| 66 | } |
| 67 | |
| 68 | FORCE_INLINE void Pop() |
| 69 | { |
| 70 | if (Count > 0) |
| 71 | Count--; |
| 72 | } |
| 73 | |
| 74 | FORCE_INLINE ProfilerMemory::Groups Peek() const |
| 75 | { |
| 76 | return Count > 0 ? (ProfilerMemory::Groups)Stack[Count - 1] : ProfilerMemory::Groups::Unknown; |
| 77 | } |
| 78 | }; |
| 79 | |
| 80 | template<> |
| 81 | struct TIsPODType<GroupStackData> |