mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Follow-up on 550e5c2fbb3a5151e18b573f246fa78dcef8e964
Fixed some spurious moves of data that should have not been moved.
This commit is contained in:
parent
3858257e28
commit
b71161265f
2 changed files with 6 additions and 7 deletions
|
@ -91,7 +91,7 @@ void RemovableDriveManager::eject_drive()
|
|||
std::cerr << "Ejecting " << mpath << " failed " << GetLastError() << " \n";
|
||||
assert(m_callback_evt_handler);
|
||||
if (m_callback_evt_handler)
|
||||
wxPostEvent(m_callback_evt_handler, RemovableDriveEjectEvent(EVT_REMOVABLE_DRIVE_EJECTED, std::pair< DriveData, bool >(std::move(*it_drive_data), false)));
|
||||
wxPostEvent(m_callback_evt_handler, RemovableDriveEjectEvent(EVT_REMOVABLE_DRIVE_EJECTED, std::pair<DriveData, bool>(*it_drive_data, false)));
|
||||
return;
|
||||
}
|
||||
DWORD deviceControlRetVal(0);
|
||||
|
@ -106,7 +106,7 @@ void RemovableDriveManager::eject_drive()
|
|||
BOOST_LOG_TRIVIAL(error) << "Ejecting " << mpath << " failed " << deviceControlRetVal << " " << GetLastError() << " \n";
|
||||
assert(m_callback_evt_handler);
|
||||
if (m_callback_evt_handler)
|
||||
wxPostEvent(m_callback_evt_handler, RemovableDriveEjectEvent(EVT_REMOVABLE_DRIVE_EJECTED, std::pair< DriveData, bool >(std::move(*it_drive_data),false)));
|
||||
wxPostEvent(m_callback_evt_handler, RemovableDriveEjectEvent(EVT_REMOVABLE_DRIVE_EJECTED, std::pair<DriveData, bool>(*it_drive_data, false)));
|
||||
return;
|
||||
}
|
||||
CloseHandle(handle);
|
||||
|
@ -364,12 +364,11 @@ void RemovableDriveManager::eject_drive()
|
|||
// wait for command to finnish (blocks ui thread)
|
||||
child.wait();
|
||||
int err = child.exit_code();
|
||||
if(err)
|
||||
{
|
||||
if (err) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Ejecting failed";
|
||||
assert(m_callback_evt_handler);
|
||||
if (m_callback_evt_handler)
|
||||
wxPostEvent(m_callback_evt_handler, RemovableDriveEjectEvent(EVT_REMOVABLE_DRIVE_EJECTED, std::pair< DriveData, bool >(std::move(*it_drive_data), false)));
|
||||
wxPostEvent(m_callback_evt_handler, RemovableDriveEjectEvent(EVT_REMOVABLE_DRIVE_EJECTED, std::pair<DriveData, bool>(*it_drive_data, false)));
|
||||
return;
|
||||
}
|
||||
BOOST_LOG_TRIVIAL(info) << "Ejecting finished";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue