FastLED 3.10.6
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 384 of file manager.cpp.hpp.

384 {
385 if (name.empty()) {
386 return fl::shared_ptr<IChannelDriver>();
387 }
388 for (const auto& entry : mDrivers) {
389 if (entry.enabled && entry.name == name) {
390 return entry.driver;
391 }
392 }
393 return fl::shared_ptr<IChannelDriver>();
394}
fl::vector< EngineEntry > mDrivers
Shared drivers sorted by priority descending (higher values first)
Definition manager.h:321
bool empty() const FL_NO_EXCEPT

References fl::basic_string::empty(), and mDrivers.

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function: