Skip to content

Commit

Permalink
VMManager: Avoid use-after-move conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
F0bes committed Feb 5, 2025
1 parent 4ab4f4a commit 1f0d6f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pcsx2/VMManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ bool VMManager::DoSaveState(const char* filename, s32 slot_for_message, bool zip
Console.WriteLn(fmt::format("Creating save state backup {}...", backup_filename));
if (!FileSystem::RenamePath(filename, backup_filename.c_str()))
{
Host::AddIconOSDMessage(std::move(osd_key), ICON_FA_EXCLAMATION_TRIANGLE,
Host::AddIconOSDMessage(osd_key, ICON_FA_EXCLAMATION_TRIANGLE,
fmt::format(
TRANSLATE_FS("VMManager", "Failed to back up old save state {}."), Path::GetFileName(filename)),
Host::OSD_ERROR_DURATION);
Expand Down Expand Up @@ -2234,7 +2234,7 @@ bool VMManager::ChangeDisc(CDVD_SourceType source, std::string path)

CDVDsys_ChangeSource(source);
if (!path.empty())
CDVDsys_SetFile(source, std::move(path));
CDVDsys_SetFile(source, path);

Error error;
const bool result = DoCDVDopen(&error);
Expand Down

0 comments on commit 1f0d6f0

Please sign in to comment.