From 967ded5477680983fe7ac08ab2992374fb3c1490 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 27 Mar 2026 16:40:59 -1000 Subject: [PATCH] Add ESPHOME_ALWAYS_INLINE to call() to stabilize inlining across struct layout changes --- esphome/core/helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index 169028be1a..4937dbdd4e 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -1833,7 +1833,7 @@ template class CallbackManager { template void add(F &&callback) { this->add_(CbType::create(std::forward(callback))); } /// Call all callbacks in this manager. - void call(Ts... args) { + inline void ESPHOME_ALWAYS_INLINE call(Ts... args) { for (auto *it = this->data_, *end = it + this->size_; it != end; ++it) { it->call(args...); }