From 97ca160b08537314ca6ba953a382aebda3da06b9 Mon Sep 17 00:00:00 2001 From: t895 Date: Wed, 24 Jan 2024 12:34:50 -0500 Subject: frontend_common: Consistently use references Was swapping between references and pointers for no reason. Just unify them here since each of these utility functions will need their parameters to be alive. --- src/yuzu/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index bb0fbef7c..e14410f7d 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -2499,7 +2499,7 @@ void GMainWindow::RemoveUpdateContent(u64 program_id, InstalledEntryType type) { } void GMainWindow::RemoveAddOnContent(u64 program_id, InstalledEntryType type) { - const size_t count = ContentManager::RemoveAllDLC(system.get(), program_id); + const size_t count = ContentManager::RemoveAllDLC(*system, program_id); if (count == 0) { QMessageBox::warning(this, GetGameListErrorRemoving(type), tr("There are no DLC installed for this title.")); @@ -2796,8 +2796,7 @@ void GMainWindow::OnGameListVerifyIntegrity(const std::string& game_path) { return progress.wasCanceled(); }; - const auto result = - ContentManager::VerifyGameContents(system.get(), game_path, QtProgressCallback); + const auto result = ContentManager::VerifyGameContents(*system, game_path, QtProgressCallback); progress.close(); switch (result) { case ContentManager::GameVerificationResult::Success: @@ -3266,7 +3265,7 @@ void GMainWindow::OnMenuInstallToNAND() { return false; }; future = QtConcurrent::run([this, &file, progress_callback] { - return ContentManager::InstallNSP(system.get(), vfs.get(), file.toStdString(), + return ContentManager::InstallNSP(*system, *vfs, file.toStdString(), progress_callback); }); @@ -3369,7 +3368,7 @@ ContentManager::InstallResult GMainWindow::InstallNCA(const QString& filename) { } return false; }; - return ContentManager::InstallNCA(vfs.get(), filename.toStdString(), registered_cache, + return ContentManager::InstallNCA(*vfs, filename.toStdString(), *registered_cache, static_cast(index), progress_callback); } @@ -4119,7 +4118,7 @@ void GMainWindow::OnVerifyInstalledContents() { }; const std::vector result = - ContentManager::VerifyInstalledContents(system.get(), provider.get(), QtProgressCallback); + ContentManager::VerifyInstalledContents(*system, *provider, QtProgressCallback); progress.close(); if (result.empty()) { -- cgit v1.2.3