diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-22 13:48:46 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-22 13:48:46 +0100 |
commit | 6a7e06f875d789af0e8f9b5ce0ad24b9eaa96d25 (patch) | |
tree | 07397ab46e2518fde4140777e2e181cde8ad938e /src/crepe/manager/EventManager.h | |
parent | 296c80edd6727d6808ed0c98c001a8b456f1c037 (diff) | |
parent | 61148c757a1f742ff09e40e5347e74e638c7371c (diff) |
Merge branch 'master' into niels/UI
Diffstat (limited to 'src/crepe/manager/EventManager.h')
-rw-r--r-- | src/crepe/manager/EventManager.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/crepe/manager/EventManager.h b/src/crepe/manager/EventManager.h index 639e37f..5766a0c 100644 --- a/src/crepe/manager/EventManager.h +++ b/src/crepe/manager/EventManager.h @@ -49,8 +49,8 @@ public: * \return A unique subscription ID associated with the registered callback. */ template <typename EventType> - subscription_t subscribe(const EventHandler<EventType> & callback, - event_channel_t channel = CHANNEL_ALL); + subscription_t + subscribe(const EventHandler<EventType> & callback, event_channel_t channel = CHANNEL_ALL); /** * \brief Unsubscribe a previously registered callback. @@ -106,7 +106,7 @@ private: * \brief Represents an entry in the event queue. */ struct QueueEntry { - std::unique_ptr<Event> event; ///< The event instance. + std::unique_ptr<Event, std::function<void(Event *)>> event; ///< The event instance. event_channel_t channel = CHANNEL_ALL; ///< The channel associated with the event. std::type_index type; ///< The type of the event. }; |