mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
RunOnObject: accept pointers to member functions
This commit is contained in:
@ -33,3 +33,9 @@ auto RunOnObject(QObject* object, F&& functor)
|
||||
event.Wait();
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename Base, typename Type, typename Receiver>
|
||||
auto RunOnObject(Receiver* obj, Type Base::*func)
|
||||
{
|
||||
return RunOnObject(obj, [obj, func] { return (obj->*func)(); });
|
||||
}
|
||||
|
Reference in New Issue
Block a user