From c0d032e91b6ec21bcf60b04b5cfcc393700560a9 Mon Sep 17 00:00:00 2001 From: hreintke Date: Mon, 8 Jun 2020 17:25:55 +0200 Subject: [PATCH] API change to faciliate executer to know the number of active callbacks --- 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 187c86c2ad..8d419cbb89 100644 --- a/cores/esp8266/CallBackList.h +++ b/cores/esp8266/CallBackList.h @@ -64,7 +64,7 @@ class CallBackList } 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 @@ class CallBackList ++it; } } + return callBackEventList.size(); } };