From 4190ebebc95382d8a25bc0bb4f279390f213b705 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 9 Apr 2026 14:26:59 -1000 Subject: [PATCH] [core] Inline ControllerRegistry::register_controller into header Tiny one-liner, no reason to keep it in the .cpp. --- esphome/core/controller_registry.cpp | 2 -- esphome/core/controller_registry.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/esphome/core/controller_registry.cpp b/esphome/core/controller_registry.cpp index 92f23f5642..907e0f923d 100644 --- a/esphome/core/controller_registry.cpp +++ b/esphome/core/controller_registry.cpp @@ -6,8 +6,6 @@ namespace esphome { StaticVector ControllerRegistry::controllers; -void ControllerRegistry::register_controller(Controller *controller) { controllers.push_back(controller); } - } // namespace esphome #endif // USE_CONTROLLER_REGISTRY diff --git a/esphome/core/controller_registry.h b/esphome/core/controller_registry.h index 3c7b2b83a8..b2122d3314 100644 --- a/esphome/core/controller_registry.h +++ b/esphome/core/controller_registry.h @@ -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)