mirror of
https://github.com/gelldur/EventBus.git
synced 2024-12-26 18:51:02 +08:00
Fix api readability
This commit is contained in:
parent
54b3fae30a
commit
55dd3937fa
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user