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

Function singleton_registry_set

src/fl/stl/singleton.cpp.hpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void singleton_registry_set(const char* key, void* value) {
27 // Check if already registered (update)
28 for (int i = 0; i < registry_count; i++) {
29 if (fl::strcmp(registry[i].key, key) == 0) {
30 registry[i].value = value;
31 return;
32 }
33 }
34 // Add new entry
35 if (registry_count < REGISTRY_MAX) {
36 registry[registry_count++] = {key, value};
37 }
38}
39
40} // namespace detail
41} // namespace fl

Callers 1

SingletonSharedClass · 0.85

Calls 1

strcmpFunction · 0.85

Tested by

no test coverage detected