FastLED 3.10.9
Loading...
Searching...
No Matches

◆ findDriverByName()

fl::shared_ptr< IChannelDriver > fl::ChannelManager::findDriverByName ( const fl::string & name) const

Silent counterpart to getDriverByName().

Same lookup, no logging on miss. Lets callers that handle the "missing driver" case themselves (e.g. Channel::showPixels()'s one-shot affinity-miss diagnostic from #2455) probe the registry without triggering the per-frame FL_ERROR stream that getDriverByName() emits.

Definition at line 401 of file manager.cpp.hpp.

401 {
402 if (name.empty()) {
403 return fl::shared_ptr<IChannelDriver>();
404 }
405 for (const auto& entry : mDrivers) {
406 if (entry.enabled && entry.name == name) {
407 return entry.driver;
408 }
409 }
410 return fl::shared_ptr<IChannelDriver>();
411}
fl::vector< EngineEntry > mDrivers
Shared drivers sorted by priority descending (higher values first)
Definition manager.h:327
bool empty() const FL_NO_EXCEPT

References fl::FL_NO_EXCEPT, and mDrivers.

Referenced by getDriverByName(), autoresearch::legacyAsyncProbe(), fl::Channel::resolveDynamicDriver(), and selectDriverForChannel().

+ Here is the caller graph for this function: