mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-22 20:55:45 +00:00
yuzu qt: Use lambda and std::function for reset callback
Also makes use of std::move, and performs a clang-format cleanup. This addresses review comments. Co-authored-by: LC <mathew1800@gmail.com>
This commit is contained in:
parent
8d3c9567a2
commit
3fce0304cb
4 changed files with 17 additions and 19 deletions
|
@ -4,6 +4,7 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <QWidget>
|
||||
|
||||
|
@ -26,7 +27,7 @@ public:
|
|||
explicit ConfigureGeneral(QWidget* parent = nullptr);
|
||||
~ConfigureGeneral() override;
|
||||
|
||||
void SetResetCallback(void (*callback)(ConfigureDialog*), ConfigureDialog *param);
|
||||
void SetResetCallback(std::function<void()> callback);
|
||||
void ResetDefaults();
|
||||
void ApplyConfiguration();
|
||||
|
||||
|
@ -38,8 +39,7 @@ private:
|
|||
|
||||
void SetupPerGameUI();
|
||||
|
||||
void (*ResetCallback)(ConfigureDialog*);
|
||||
ConfigureDialog *reset_callback_param;
|
||||
std::function<void()> reset_callback;
|
||||
|
||||
std::unique_ptr<Ui::ConfigureGeneral> ui;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue