From 98f7ae93db69e51cfa0d020ea999f829f3c7fb79 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 6 Sep 2025 23:27:14 -0500 Subject: [PATCH 1/2] Update esphome/core/scheduler.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- esphome/core/scheduler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/scheduler.cpp b/esphome/core/scheduler.cpp index cb8f5c75b8..feaa41a97f 100644 --- a/esphome/core/scheduler.cpp +++ b/esphome/core/scheduler.cpp @@ -474,7 +474,7 @@ void HOT Scheduler::call(uint32_t now) { this->to_add_.push_back(std::move(item)); } - added_items |= this->to_add_.empty() == false; + added_items |= !this->to_add_.empty(); } } From fec9e63b0c76ce8a804d9d89cfd933fbf5c5648e Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 6 Sep 2025 23:29:11 -0500 Subject: [PATCH 2/2] rename --- esphome/core/scheduler.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/core/scheduler.cpp b/esphome/core/scheduler.cpp index cb8f5c75b8..d0230d46fc 100644 --- a/esphome/core/scheduler.cpp +++ b/esphome/core/scheduler.cpp @@ -327,7 +327,7 @@ void HOT Scheduler::call(uint32_t now) { this->process_to_add(); // Track if any items were added to to_add_ during this call (intervals or from callbacks) - bool added_items = false; + bool has_added_items = false; #ifdef ESPHOME_DEBUG_SCHEDULER static uint64_t last_print = 0; @@ -474,11 +474,11 @@ void HOT Scheduler::call(uint32_t now) { this->to_add_.push_back(std::move(item)); } - added_items |= this->to_add_.empty() == false; + has_added_items |= !this->to_add_.empty(); } } - if (added_items) { + if (has_added_items) { this->process_to_add(); } }