From 168081c0f07e58e027a2a173db93079df5c593d3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 18 Feb 2026 22:47:27 -0600 Subject: [PATCH] Rename call_loop() to call_loop_() for naming convention Non-virtual protected methods require trailing underscore per clang-tidy readability-identifier-naming. --- esphome/core/component.cpp | 6 +++--- esphome/core/component.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/esphome/core/component.cpp b/esphome/core/component.cpp index c64131cdbd..1ea34de517 100644 --- a/esphome/core/component.cpp +++ b/esphome/core/component.cpp @@ -204,7 +204,7 @@ bool Component::cancel_retry(uint32_t id) { #pragma GCC diagnostic pop } -void Component::call_loop() { this->loop(); } +void Component::call_loop_() { this->loop(); } void Component::call_setup() { this->setup(); } void Component::call_dump_config() { this->dump_config(); @@ -255,11 +255,11 @@ void Component::call() { case COMPONENT_STATE_SETUP: // State setup: Call first loop and set state to loop this->set_component_state_(COMPONENT_STATE_LOOP); - this->call_loop(); + this->call_loop_(); break; case COMPONENT_STATE_LOOP: // State loop: Call loop - this->call_loop(); + this->call_loop_(); break; case COMPONENT_STATE_FAILED: // State failed: Do nothing diff --git a/esphome/core/component.h b/esphome/core/component.h index 3f9116c75c..bbb4e84c19 100644 --- a/esphome/core/component.h +++ b/esphome/core/component.h @@ -286,7 +286,7 @@ class Component { protected: friend class Application; - void call_loop(); + void call_loop_(); virtual void call_setup(); virtual void call_dump_config();