Fix shadowing variables in labmdas

GCC generates warnings about these, although the variable being shadowed is not captured by the lambda.
This commit is contained in:
Pokechu22
2022-01-16 21:30:53 -08:00
parent 0e23dfbb25
commit a6d516dc94
2 changed files with 18 additions and 16 deletions
+14 -12
View File
@@ -1747,18 +1747,20 @@ bool NetPlayClient::StartGame(const std::string& path)
// boot game
auto boot_session_data = std::make_unique<BootSessionData>();
boot_session_data->SetWiiSyncData(
std::move(m_wii_sync_fs), std::move(m_wii_sync_titles), std::move(m_wii_sync_redirect_folder),
[] {
// on emulation end clean up the Wii save sync directory -- see OnSyncSaveDataWii()
const std::string path = File::GetUserPath(D_USER_IDX) + "Wii" GC_MEMCARD_NETPLAY DIR_SEP;
if (File::Exists(path))
File::DeleteDirRecursively(path);
const std::string redirect_path =
File::GetUserPath(D_USER_IDX) + "Redirect" GC_MEMCARD_NETPLAY DIR_SEP;
if (File::Exists(redirect_path))
File::DeleteDirRecursively(redirect_path);
});
boot_session_data->SetWiiSyncData(std::move(m_wii_sync_fs), std::move(m_wii_sync_titles),
std::move(m_wii_sync_redirect_folder), [] {
// on emulation end clean up the Wii save sync directory --
// see OnSyncSaveDataWii()
const std::string wii_path = File::GetUserPath(D_USER_IDX) +
"Wii" GC_MEMCARD_NETPLAY DIR_SEP;
if (File::Exists(wii_path))
File::DeleteDirRecursively(wii_path);
const std::string redirect_path =
File::GetUserPath(D_USER_IDX) +
"Redirect" GC_MEMCARD_NETPLAY DIR_SEP;
if (File::Exists(redirect_path))
File::DeleteDirRecursively(redirect_path);
});
m_dialog->BootGame(path, std::move(boot_session_data));
UpdateDevices();