aboutsummaryrefslogtreecommitdiff
path: root/src/yuzu/main.cpp
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2021-05-25 22:14:55 -0400
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2021-06-01 17:22:06 -0400
commit3fce0304cb30eba167d49cd1c23a352d2c2d69e3 (patch)
treea7c58c2c58c2b8f5971e8ec473267266c07ef320 /src/yuzu/main.cpp
parent8d3c9567a2ac58e32db87c617b09595347ae15b2 (diff)
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>
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r--src/yuzu/main.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp
index e5a2fdf8c0..c5dec215da 100644
--- a/src/yuzu/main.cpp
+++ b/src/yuzu/main.cpp
@@ -2611,17 +2611,18 @@ void GMainWindow::OnConfigure() {
LOG_WARNING(Frontend, "Failed to remove game metadata cache files");
}
- // Explicitly save the game directories, since reinitializing config does not do so.
- QVector<UISettings::GameDir> old_game_dirs = UISettings::values.game_dirs;
- QVector<u64> old_favorited_ids = UISettings::values.favorited_ids;
+ // Explicitly save the game directories, since reinitializing config does not explicitly do
+ // so.
+ QVector<UISettings::GameDir> old_game_dirs = std::move(UISettings::values.game_dirs);
+ QVector<u64> old_favorited_ids = std::move(UISettings::values.favorited_ids);
Settings::values.disabled_addons.clear();
config = std::make_unique<Config>();
UISettings::values.reset_to_defaults = false;
- UISettings::values.game_dirs = old_game_dirs;
- UISettings::values.favorited_ids = old_favorited_ids;
+ UISettings::values.game_dirs = std::move(old_game_dirs);
+ UISettings::values.favorited_ids = std::move(old_favorited_ids);
InitializeRecentFileMenuActions();