From 55ffb625717e31a480e6b45b899acc099e182890 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 27 Feb 2026 21:59:58 -1000 Subject: [PATCH] Inline register_component_ in header for better codegen --- esphome/core/application.cpp | 1 - esphome/core/application.h | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/esphome/core/application.cpp b/esphome/core/application.cpp index f963afa597..e51bc22f15 100644 --- a/esphome/core/application.cpp +++ b/esphome/core/application.cpp @@ -79,7 +79,6 @@ static void insertion_sort_by_priority(Iterator first, Iterator last) { } } -void Application::register_component_(Component *comp) { this->components_.push_back(comp); } void Application::setup() { ESP_LOGI(TAG, "Running through setup()"); ESP_LOGV(TAG, "Sorting components by setup priority"); diff --git a/esphome/core/application.h b/esphome/core/application.h index ba3ce13291..9f4672b75d 100644 --- a/esphome/core/application.h +++ b/esphome/core/application.h @@ -521,7 +521,7 @@ class Application { #endif #endif - void register_component_(Component *comp); + inline void register_component_(Component *comp) { this->components_.push_back(comp); } void calculate_looping_components_(); void add_looping_components_by_state_(bool match_loop_done);