FastLED 3.9.15
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 356 of file manager.cpp.hpp.

356 {
357 if (name.empty()) {
358 return fl::shared_ptr<IChannelDriver>();
359 }
360 for (const auto& entry : mDrivers) {
361 if (entry.enabled && entry.name == name) {
362 return entry.driver;
363 }
364 }
365 return fl::shared_ptr<IChannelDriver>();
366}
fl::vector< EngineEntry > mDrivers
Shared drivers sorted by priority descending (higher values first)
Definition manager.h:287
bool empty() const FL_NOEXCEPT

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: