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

◆ push()

void fl::ScopedTrace::push ( const char * function,
int line )
static

Push a function name onto the call stack.

Parameters
functionFunction name (must be string literal or have static lifetime)
lineLine number (from LINE)

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

53 {
54 if (!function) {
55 return; // Ignore null function names
56 }
57
58 auto& storage = getTraceStorage();
59
60 // Always increment depth counter (tracks true depth even on overflow)
61 storage.stackDepth++;
62
63 // Only push to storage if we have capacity
64 if (storage.callStack.size() < FL_STACK_TRACE_MAX_DEPTH) {
65 storage.callStack.push_back(TraceEntry(function, line));
66 }
67 // If size >= MAX_DEPTH, we're in overflow - just track depth
68}
static TraceStorage & getTraceStorage() FL_NOEXCEPT
Definition trace.cpp.hpp:48
#define FL_STACK_TRACE_MAX_DEPTH
Definition trace.cpp.hpp:21

References FL_NOEXCEPT, FL_STACK_TRACE_MAX_DEPTH, and fl::getTraceStorage().

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

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