1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-12-29 10:09:43 -06:00

Switch from auto_ptr to unique_ptr (#638)

This commit is contained in:
Christopher Bergqvist
2020-06-11 18:02:28 +02:00
committed by GitHub
parent 8250e83e61
commit 0a2c565aa9
29 changed files with 71 additions and 73 deletions

View File

@@ -125,9 +125,7 @@ namespace VeraCrypt
firstFragmentWorkItem->ItemCompletedEvent.Wait();
auto_ptr <Exception> itemException;
if (firstFragmentWorkItem->ItemException.get())
itemException = firstFragmentWorkItem->ItemException;
unique_ptr <Exception> itemException = std::move(firstFragmentWorkItem->ItemException);
firstFragmentWorkItem->State.Set (WorkItem::State::Free);
WorkItemCompletedEvent.Signal();

View File

@@ -44,7 +44,7 @@ namespace VeraCrypt
};
struct WorkItem *FirstFragment;
auto_ptr <Exception> ItemException;
unique_ptr <Exception> ItemException;
SyncEvent ItemCompletedEvent;
SharedVal <size_t> OutstandingFragmentCount;
SharedVal <State::Enum> State;