MCPcopy Create free account
hub / github.com/FastLED/FastLED / pop

Method pop

src/fl/system/trace.cpp.hpp:70–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void ScopedTrace::pop() FL_NOEXCEPT {
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}
90
91fl::size ScopedTrace::depth() FL_NOEXCEPT {
92 return getTraceStorage().stackDepth;

Callers

nothing calls this directly

Calls 3

emptyMethod · 0.45
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected