FastLED 3.9.15
Loading...
Searching...
No Matches

◆ pop()

void fl::ScopedTrace::pop ( )
static

Pop the most recent function from the call stack.

Definition at line 70 of file trace.cpp.hpp.

70 {
71 auto& storage = getTraceStorage();
72
73 // Guard against underflow
74 if (storage.stackDepth == 0) {
75 return;
76 }
77
78 // Decrement depth counter first
79 storage.stackDepth--;
80
81 // Pop from callStack only if:
82 // 1. We have entries in the stack
83 // 2. After decrement, depth matches or is less than callStack size
84 // (this handles both normal operation and overflow recovery)
85 if (!storage.callStack.empty() && storage.stackDepth < storage.callStack.size()) {
86 // Use manual pop since FixedVector doesn't have pop_back
87 storage.callStack.resize(storage.callStack.size() - 1);
88 }
89}
static TraceStorage & getTraceStorage() FL_NOEXCEPT
Definition trace.cpp.hpp:48

References FL_NOEXCEPT, and fl::getTraceStorage().

Referenced by ~ScopedTrace(), and operator=().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: