mirror of
https://github.com/esphome/esphome.git
synced 2026-09-16 01:28:39 +00:00
Add ESPHOME_ALWAYS_INLINE to call() to stabilize inlining across struct layout changes
This commit is contained in:
@@ -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...);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user