From 7346754c09d6e8a99bf09bb5fb8478b785b4df2b Mon Sep 17 00:00:00 2001 From: hreintke Date: Mon, 8 Jun 2020 20:19:18 +0200 Subject: [PATCH] API change to faciliate executer to know the number of active callbacks (#7361) --- cores/esp8266/CallBackList.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cores/esp8266/CallBackList.h b/cores/esp8266/CallBackList.h index 187c86c2a..8d419cbb8 100644 --- a/cores/esp8266/CallBackList.h +++ b/cores/esp8266/CallBackList.h @@ -64,7 +64,7 @@ public: } template - void execute(Args... params) { + int execute(Args... params) { for(auto it = std::begin(callBackEventList); it != std::end(callBackEventList); ) { CallBackHandler &handler = *it; if (handler->allowRemove() && handler.unique()) { @@ -75,6 +75,7 @@ public: ++it; } } + return callBackEventList.size(); } };