Add ESPHOME_ALWAYS_INLINE to call() to stabilize inlining across struct layout changes

This commit is contained in:
J. Nick Koston
2026-03-27 16:40:59 -10:00
parent 42fe39cfd9
commit 967ded5477
+1 -1
View File
@@ -1833,7 +1833,7 @@ template<typename... Ts> class CallbackManager<void(Ts...)> {
template<typename F> void add(F &&callback) { this->add_(CbType::create(std::forward<F>(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...);
}