From 377613c9ba2ef974a8b793bb632d1d4c31a5861d Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:03:48 +0800 Subject: [PATCH] fix --- .../src/dexode/eventbus/stream/ProtectedEventStream.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/3party/EventBus/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp b/3party/EventBus/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp index ad60896..d861aeb 100644 --- a/3party/EventBus/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp +++ b/3party/EventBus/lib/src/dexode/eventbus/stream/ProtectedEventStream.hpp @@ -18,9 +18,9 @@ class ProtectedEventStream : public EventStream using Callback = std::function; public: - void postpone(std::any event) override + void postpone(nonstd::any event) override { - auto myEvent = std::any_cast(event); + auto myEvent = nonstd::any_cast(event); std::lock_guard writeGuard{_mutexEvent}; _queue.push_back(std::move(myEvent)); } @@ -67,10 +67,10 @@ public: return processEvents.size(); } - bool addListener(const std::uint32_t listenerID, std::any callback) override + bool addListener(const std::uint32_t listenerID, nonstd::any callback) override { std::lock_guard writeGuard{_mutexCallbacks}; - auto myCallback = std::any_cast(callback); + auto myCallback = nonstd::any_cast(callback); if(_isProcessing) { _waiting.emplace_back(listenerID, std::move(myCallback));