mirror of
https://github.com/esphome/esphome.git
synced 2024-12-26 07:24:54 +01:00
Add size getter to CallbackManager (#5129)
This commit is contained in:
parent
de626c0f5f
commit
d238155640
1 changed files with 1 additions and 0 deletions
|
@ -475,6 +475,7 @@ template<typename... Ts> class CallbackManager<void(Ts...)> {
|
|||
for (auto &cb : this->callbacks_)
|
||||
cb(args...);
|
||||
}
|
||||
size_t size() const { return this->callbacks_.size(); }
|
||||
|
||||
/// Call all callbacks in this manager.
|
||||
void operator()(Ts... args) { call(args...); }
|
||||
|
|
Loading…
Reference in a new issue