This commit is contained in:
Jorijn van der Graaf 2025-11-25 21:20:10 +01:00
commit 72fc594aa2

View file

@ -58,13 +58,13 @@ namespace Crafter {
// Base implementation for Event<T> - common functionality // Base implementation for Event<T> - common functionality
template<typename T> template<typename T>
class EventBase { class EventBase {
public:
#ifdef CRAFTER_TIMING
std::map<const EventListener<T>*, std::chrono::nanoseconds> listenerTimes;
#endif
protected: protected:
std::map<int, std::vector<EventListener<T>*>> listeners; std::map<int, std::vector<EventListener<T>*>> listeners;
#ifdef CRAFTER_TIMING
std::map<const EventListener<T>*, std::chrono::nanoseconds> listenerTimes;
#endif
public: public:
EventBase() = default; EventBase() = default;
EventBase(EventBase&& other) : listeners(std::move(other.listeners)) { EventBase(EventBase&& other) : listeners(std::move(other.listeners)) {