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

Method DurationReached

lib/utils/duration-modifier.cpp:51–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51bool DurationModifier::DurationReached()
52{
53 switch (_type) {
54 case DurationModifier::Type::NONE:
55 return true;
56 case DurationModifier::Type::MORE:
57 return _duration.DurationReached();
58 case DurationModifier::Type::EQUAL:
59 if (_duration.DurationReached() && !_durationWasReached) {
60 _durationWasReached = true;
61 return true;
62 }
63 break;
64 case DurationModifier::Type::LESS:
65 return !_duration.DurationReached();
66 case DurationModifier::Type::WITHIN:
67 if (_duration.IsReset()) {
68 return false;
69 }
70 return !_duration.DurationReached();
71 default:
72 break;
73 }
74 return false;
75}
76
77void DurationModifier::ResetDuration()
78{

Callers

nothing calls this directly

Calls 1

IsResetMethod · 0.80

Tested by

no test coverage detected