From 0a2c565aa98fa7bc9623a753370e565fc5ed1e63 Mon Sep 17 00:00:00 2001 From: Christopher Bergqvist Date: Thu, 11 Jun 2020 18:02:28 +0200 Subject: Switch from auto_ptr to unique_ptr (#638) --- src/Volume/EncryptionThreadPool.cpp | 4 +--- src/Volume/EncryptionThreadPool.h | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/Volume') diff --git a/src/Volume/EncryptionThreadPool.cpp b/src/Volume/EncryptionThreadPool.cpp index 4219c7d7..04c32c7d 100644 --- a/src/Volume/EncryptionThreadPool.cpp +++ b/src/Volume/EncryptionThreadPool.cpp @@ -125,9 +125,7 @@ namespace VeraCrypt firstFragmentWorkItem->ItemCompletedEvent.Wait(); - auto_ptr itemException; - if (firstFragmentWorkItem->ItemException.get()) - itemException = firstFragmentWorkItem->ItemException; + unique_ptr itemException = std::move(firstFragmentWorkItem->ItemException); firstFragmentWorkItem->State.Set (WorkItem::State::Free); WorkItemCompletedEvent.Signal(); diff --git a/src/Volume/EncryptionThreadPool.h b/src/Volume/EncryptionThreadPool.h index 43aa4c80..baf31e23 100644 --- a/src/Volume/EncryptionThreadPool.h +++ b/src/Volume/EncryptionThreadPool.h @@ -44,7 +44,7 @@ namespace VeraCrypt }; struct WorkItem *FirstFragment; - auto_ptr ItemException; + unique_ptr ItemException; SyncEvent ItemCompletedEvent; SharedVal OutstandingFragmentCount; SharedVal State; -- cgit v1.2.3