mirror of
https://github.com/esphome/esphome.git
synced 2026-08-31 18:16:03 +00:00
[core] Inline ControllerRegistry::register_controller into header
Tiny one-liner, no reason to keep it in the .cpp.
This commit is contained in:
@@ -6,8 +6,6 @@ namespace esphome {
|
||||
|
||||
StaticVector<Controller *, CONTROLLER_REGISTRY_MAX> ControllerRegistry::controllers;
|
||||
|
||||
void ControllerRegistry::register_controller(Controller *controller) { controllers.push_back(controller); }
|
||||
|
||||
} // namespace esphome
|
||||
|
||||
#endif // USE_CONTROLLER_REGISTRY
|
||||
|
||||
@@ -34,7 +34,7 @@ class ControllerRegistry {
|
||||
* Controllers should call this in their setup() method.
|
||||
* Typically only APIServer and WebServer register.
|
||||
*/
|
||||
static void register_controller(Controller *controller);
|
||||
static void register_controller(Controller *controller) { controllers.push_back(controller); }
|
||||
|
||||
// Notify method declarations (generated from entity_types.inc)
|
||||
// NOLINTBEGIN(bugprone-macro-parentheses)
|
||||
|
||||
Reference in New Issue
Block a user