diff options
author | Lioncash <mathew1800@gmail.com> | 2018-11-27 13:52:13 -0500 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-11-27 16:33:14 -0500 |
commit | d72c809030ac74c532dd0126bf2ce7494a01cc9b (patch) | |
tree | cdccfa369f2be364e8b58bfad41fa1b1f8093790 /src/yuzu/main.cpp | |
parent | 1cd40f107f2681bf3df84aa148feb20a179d6c23 (diff) |
file_sys/registered_cache: Use regular const references instead of std::shared_ptr for InstallEntry()
These parameters don't need to utilize a shared lifecycle directly in
the interface. Instead, the caller should provide a regular reference
for the function to use. This also allows the type system to flag
attempts to pass nullptr and makes it more generic, since it can now be
used in contexts where a shared_ptr isn't being used (in other words, we
don't constrain the usage of the interface to a particular mode of
memory management).
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 9c6d150a52..93bf117c82 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1105,14 +1105,14 @@ void GMainWindow::OnMenuInstallToNAND() { return; } const auto res = - Service::FileSystem::GetUserNANDContents()->InstallEntry(nsp, false, qt_raw_copy); + Service::FileSystem::GetUserNANDContents()->InstallEntry(*nsp, false, qt_raw_copy); if (res == FileSys::InstallResult::Success) { success(); } else { if (res == FileSys::InstallResult::ErrorAlreadyExists) { if (overwrite()) { const auto res2 = Service::FileSystem::GetUserNANDContents()->InstallEntry( - nsp, true, qt_raw_copy); + *nsp, true, qt_raw_copy); if (res2 == FileSys::InstallResult::Success) { success(); } else { @@ -1167,10 +1167,10 @@ void GMainWindow::OnMenuInstallToNAND() { FileSys::InstallResult res; if (index >= static_cast<size_t>(FileSys::TitleType::Application)) { res = Service::FileSystem::GetUserNANDContents()->InstallEntry( - nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); + *nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); } else { res = Service::FileSystem::GetSystemNANDContents()->InstallEntry( - nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); + *nca, static_cast<FileSys::TitleType>(index), false, qt_raw_copy); } if (res == FileSys::InstallResult::Success) { @@ -1178,7 +1178,7 @@ void GMainWindow::OnMenuInstallToNAND() { } else if (res == FileSys::InstallResult::ErrorAlreadyExists) { if (overwrite()) { const auto res2 = Service::FileSystem::GetUserNANDContents()->InstallEntry( - nca, static_cast<FileSys::TitleType>(index), true, qt_raw_copy); + *nca, static_cast<FileSys::TitleType>(index), true, qt_raw_copy); if (res2 == FileSys::InstallResult::Success) { success(); } else { |