mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2025-08-04 11:02:25 -07: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:
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user