From fcaaa46bd914ccd9836cde0b6c2a05a1c3a35376 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 20 Mar 2026 19:20:02 -1000 Subject: [PATCH] [core] Use ESPHOME_ALWAYS_INLINE macro for consistency --- esphome/core/automation.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/esphome/core/automation.h b/esphome/core/automation.h index 954565aca0..ca4a2c8b6b 100644 --- a/esphome/core/automation.h +++ b/esphome/core/automation.h @@ -324,7 +324,7 @@ template class Trigger { /// Inform the parent automation that the event has triggered. // Force-inline: collapses the Trigger→Automation→ActionList forwarding // chain into a single frame, reducing automation call stack depth. - __attribute__((always_inline)) void trigger(const Ts &...x) { + inline void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE { if (this->automation_parent_ == nullptr) return; this->automation_parent_->trigger(x...); @@ -433,7 +433,7 @@ template class ActionList { } // Force-inline: part of the Trigger→Automation→ActionList forwarding // chain collapsed to reduce automation call stack depth. - __attribute__((always_inline)) void play(const Ts &...x) { + inline void play(const Ts &...x) ESPHOME_ALWAYS_INLINE { if (this->actions_begin_ != nullptr) this->actions_begin_->play_complex(x...); } @@ -479,7 +479,7 @@ template class Automation { // Force-inline: part of the Trigger→Automation→ActionList forwarding // chain collapsed to reduce automation call stack depth. - __attribute__((always_inline)) void trigger(const Ts &...x) { this->actions_.play(x...); } + inline void trigger(const Ts &...x) ESPHOME_ALWAYS_INLINE { this->actions_.play(x...); } bool is_running() { return this->actions_.is_running(); }