mirror of https://github.com/mgba-emu/mgba.git
Qt: Don't use bind with templated return type when void needed
This commit is contained in:
parent
a3ccb49e5d
commit
d4f1838a4a
|
@ -73,7 +73,9 @@ private:
|
||||||
|
|
||||||
template<typename T, typename V>
|
template<typename T, typename V>
|
||||||
Action* ActionMapper::addAction(const QString& visibleName, const QString& name, T* obj, V (T::*method)(), const QString& menu, const QKeySequence& shortcut) {
|
Action* ActionMapper::addAction(const QString& visibleName, const QString& name, T* obj, V (T::*method)(), const QString& menu, const QKeySequence& shortcut) {
|
||||||
return addAction(visibleName, name, std::bind(method, obj), menu, shortcut);
|
return addAction(visibleName, name, [method, obj]() -> void {
|
||||||
|
(obj->*method)();
|
||||||
|
}, menu, shortcut);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T, typename V>
|
template<typename T, typename V>
|
||||||
|
|
Loading…
Reference in New Issue