MCPcopy Create free account
hub / github.com/FastLED/FastLED / removeFx

Method removeFx

src/fl/fx/fx_engine.cpp.hpp:66–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66FxPtr FxEngine::removeFx(int index) {
67 if (!mEffects.has(index)) {
68 return FxPtr();
69 }
70
71 FxPtr removedFx;
72 bool ok = mEffects.get(index, &removedFx);
73 if (!ok) {
74 return FxPtr();
75 }
76
77 if (mCurrId == index) {
78 // If we're removing the current effect, switch to the next one
79 mEffects.next(mCurrId, &mCurrId, true);
80 mDurationSet = true;
81 mDuration = 0; // Instant transition
82 }
83
84 return removedFx;
85}
86
87FxPtr FxEngine::getFx(int id) {
88 if (mEffects.has(id)) {

Callers

nothing calls this directly

Calls 3

hasMethod · 0.45
getMethod · 0.45
nextMethod · 0.45

Tested by

no test coverage detected