Switch from auto_ptr to unique_ptr (#638)

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

No files matched your search

+1 -3
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();
+1 -1
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;