diff --git a/lib/src/dexode/EventBus.hpp b/lib/src/dexode/EventBus.hpp index 64b968d..97d252f 100644 --- a/lib/src/dexode/EventBus.hpp +++ b/lib/src/dexode/EventBus.hpp @@ -29,17 +29,17 @@ public: EventBus& operator=(const EventBus&) = delete; template - constexpr void post(Event&& event) + constexpr void post(const Event& event) { static_assert(eventbus::internal::validateEvent(), "Invalid event"); - _base.template post(std::forward(event)); + _base.template post(event); } template - constexpr void postpone(Event&& event) + constexpr void postpone(Event event) { static_assert(eventbus::internal::validateEvent(), "Invalid event"); - _base.template postpone(std::forward(event)); + _base.template postpone(std::move(event)); } constexpr std::size_t processAll()