MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GroupStackData

Class GroupStackData

Source/Engine/Profiler/ProfilerMemory.cpp:55–78  ·  view source on GitHub ↗

Compact groups stack container.

Source from the content-addressed store, hash-verified

53
54// Compact groups stack container.
55struct 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
80template<>
81struct TIsPODType<GroupStackData>

Callers

nothing calls this directly

Calls 1

PeekFunction · 0.50

Tested by

no test coverage detected