1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2026-06-09 22:36:59 -05: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
+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;