Fix api readability

This commit is contained in:
Dawid Drozd 2019-09-15 02:45:13 +02:00
parent 54b3fae30a
commit 55dd3937fa

View File

@ -29,17 +29,17 @@ public:
EventBus& operator=(const EventBus&) = delete;
template <typename Event>
constexpr void post(Event&& event)
constexpr void post(const Event& event)
{
static_assert(eventbus::internal::validateEvent<Event>(), "Invalid event");
_base.template post<Event>(std::forward<Event>(event));
_base.template post<Event>(event);
}
template <typename Event>
constexpr void postpone(Event&& event)
constexpr void postpone(Event event)
{
static_assert(eventbus::internal::validateEvent<Event>(), "Invalid event");
_base.template postpone<Event>(std::forward<Event>(event));
_base.template postpone<Event>(std::move(event));
}
constexpr std::size_t processAll()