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

Method ValidateLogicSelection

lib/macro/macro-condition.cpp:42–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void MacroCondition::ValidateLogicSelection(bool isRootCondition,
43 const char *context)
44{
45 if (_logic.IsValidSelection(isRootCondition)) {
46 return;
47 }
48
49 if (_logic.IsRootType()) {
50 _logic.SetType(Logic::Type::ROOT_NONE);
51 blog(LOG_WARNING,
52 "setting invalid logic selection to 'if' for macro %s",
53 context);
54 return;
55 }
56
57 _logic.SetType(Logic::Type::AND);
58 SetEnabled(false);
59 blog(LOG_WARNING,
60 "setting invalid logic selection to 'ignore' for macro %s",
61 context);
62}
63
64void MacroCondition::ResetDuration()
65{

Callers 1

LoadMethod · 0.80

Calls 3

IsValidSelectionMethod · 0.80
IsRootTypeMethod · 0.80
SetTypeMethod · 0.45

Tested by

no test coverage detected