New signal code did not work well with unbound parameters like 'const Type&' instead of 'Type'
parent
c2a6e4d043
commit
1988d34f4a
|
@ -648,7 +648,11 @@ namespace tgui
|
|||
static auto bindImpl(std::index_sequence<Indices...>, Signal& signal, std::function<void(Args...)>&& handler, BoundArgs&&... args)
|
||||
{
|
||||
const std::size_t offset = signal.validateTypes({typeid(UnboundArgs)...});
|
||||
return [=](){ std::invoke(handler, unbind(std::forward<BoundArgs>(args))..., internal_signal::dereference<UnboundArgs>(internal_signal::parameters[offset + Indices])...); };
|
||||
return [=](){
|
||||
std::invoke(handler,
|
||||
unbind(std::forward<BoundArgs>(args))...,
|
||||
internal_signal::dereference<std::decay_t<UnboundArgs>>(internal_signal::parameters[offset + Indices])...);
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue