FastLED 3.10.8
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 394 of file manager.cpp.hpp.

394 {
395 if (name.empty()) {
396 return fl::shared_ptr<IChannelDriver>();
397 }
398 for (const auto& entry : mDrivers) {
399 if (entry.enabled && entry.name == name) {
400 return entry.driver;
401 }
402 }
403 return fl::shared_ptr<IChannelDriver>();
404}
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(), fl::Channel::resolveDynamicDriver(), and selectDriverForChannel().

+ Here is the caller graph for this function: