[ox/event] Fix build error in exception variant of Signal

This commit is contained in:
Gary Talent 2021-08-02 21:19:05 -05:00
parent ad0d5c8caf
commit e7bf3d5413

View File

@ -43,11 +43,11 @@ class Signal {
virtual const void *receiver() noexcept { return nullptr; }
};
template<typename RetT>
template<typename F>
struct FunctionSlot: public BaseSlot {
RetT (*f)(Args...);
F f;
explicit FunctionSlot(RetT (*f)(Args...)) {
explicit FunctionSlot(F f) {
this->f = f;
}
@ -150,7 +150,7 @@ Signal<Args...>::~Signal() noexcept {
template<class... Args>
void Signal<Args...>::connect(Error(*f)(Args...)) const noexcept {
m_slots.emplace_back(new FunctionSlot(f));
m_slots.emplace_back(new FunctionSlot<decltype(f)>(f));
}
template<class... Args>