UsermodManager: Make into namespace

Namespaces are the C++ language construct for grouping global functions.
This commit is contained in:
Will Miles
2024-10-20 10:42:02 -04:00
parent 0a97e28aab
commit 95b4bde918
3 changed files with 25 additions and 30 deletions

View File

@@ -3,6 +3,9 @@
* Registration and management utility for v2 usermods
*/
static Usermod* ums[WLED_MAX_USERMODS] = {nullptr};
byte UsermodManager::numMods = 0;
//Usermod Manager internals
void UsermodManager::setup() { for (unsigned i = 0; i < numMods; i++) ums[i]->setup(); }
void UsermodManager::connected() { for (unsigned i = 0; i < numMods; i++) ums[i]->connected(); }
@@ -69,8 +72,6 @@ bool UsermodManager::add(Usermod* um)
return true;
}
Usermod* UsermodManager::ums[WLED_MAX_USERMODS] = {nullptr};
byte UsermodManager::numMods = 0;
/* Usermod v2 interface shim for oappend */
Print* Usermod::oappend_shim = nullptr;