[ox/event] Fix build error in exception variant of Signal
This commit is contained in:
parent
ad0d5c8caf
commit
e7bf3d5413
8
deps/ox/src/ox/event/signal.hpp
vendored
8
deps/ox/src/ox/event/signal.hpp
vendored
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user