Add size getter to CallbackManager (#5129)

This commit is contained in:
Jesse Hills 2023-07-20 12:37:42 +12:00 committed by GitHub
parent de626c0f5f
commit d238155640
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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...); }