From 63e5ab8fdbfac2553c79a4c3dc03039875d581c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Tue, 18 Feb 2020 18:02:29 +0100 Subject: Scratch the pointer returning get and instead add getType. --- src/events_ds.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/events_ds.h') diff --git a/src/events_ds.h b/src/events_ds.h index 2e8fa43..0a93fe9 100644 --- a/src/events_ds.h +++ b/src/events_ds.h @@ -72,9 +72,9 @@ public: template T& get(EventID event_id); - //! Returns a pointer to the event with id begin event_id. As Event has a - //! member variable that carries the type, it can be then casted appropriately. - Event* get(EventID event_id); + //! In case we don't know the type of an event, we can use this function to + //! retrieve it and then use get(...) to get the event. + Event::Type getType(EventID event_id) const; //! Returns the number of all events of a certain channel. std::size_t numberOfEvents(channel_t ch) const; -- cgit v1.2.3