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

Function getMacroSegmentFromNestedMacro

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

Source from the content-addressed store, hash-verified

544}
545
546static MacroSegment *
547getMacroSegmentFromNestedMacro(Macro *nestedMacro,
548 const std::vector<MacroEdit *> &macroEdits)
549{
550 for (const auto &macroEdit : macroEdits) {
551 const auto macro = macroEdit->GetMacro();
552 if (!macro) {
553 continue;
554 }
555 for (const auto &action : macro->Actions()) {
556 if (isMatchingNestedMacroAction(action.get(),
557 nestedMacro)) {
558 return action.get();
559 }
560 }
561 for (const auto &action : macro->ElseActions()) {
562 if (isMatchingNestedMacroAction(action.get(),
563 nestedMacro)) {
564 return action.get();
565 }
566 }
567 }
568 return nullptr;
569}
570
571void TempVariableSelection::PopulateSelection()
572{

Callers 1

PopulateSelectionMethod · 0.85

Calls 3

GetMacroMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected