MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / getDepth

Function getDepth

lib/utils/temp-variable.cpp:318–329  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316}
317
318static int getDepth(MacroSegment *segment, const Macro *macro, int depth = 0)
319{
320 if (!macro) {
321 return -1;
322 }
323
324 if (segmentIsPartOfMacro(segment, macro)) {
325 return depth;
326 }
327
328 return getDepth(segment, getParentMacro(macro), depth + 1);
329}
330
331void TempVariableRef::Save(obs_data_t *obj, Macro *macro,
332 const char *name) const

Callers 1

SaveMethod · 0.85

Calls 2

segmentIsPartOfMacroFunction · 0.85
getParentMacroFunction · 0.85

Tested by

no test coverage detected