diff options
Diffstat (limited to 'src/Common/SecurityToken.cpp')
-rw-r--r-- | src/Common/SecurityToken.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Common/SecurityToken.cpp b/src/Common/SecurityToken.cpp index 841ca720..a6759bf8 100644 --- a/src/Common/SecurityToken.cpp +++ b/src/Common/SecurityToken.cpp @@ -512,11 +512,11 @@ namespace VeraCrypt } } #ifdef TC_WINDOWS - void SecurityToken::InitLibrary (const wstring &pkcs11LibraryPath, auto_ptr <GetPinFunctor> pinCallback, auto_ptr <SendExceptionFunctor> warningCallback) + void SecurityToken::InitLibrary (const wstring &pkcs11LibraryPath, unique_ptr <GetPinFunctor> pinCallback, unique_ptr <SendExceptionFunctor> warningCallback) #else - void SecurityToken::InitLibrary (const string &pkcs11LibraryPath, auto_ptr <GetPinFunctor> pinCallback, auto_ptr <SendExceptionFunctor> warningCallback) + void SecurityToken::InitLibrary (const string &pkcs11LibraryPath, unique_ptr <GetPinFunctor> pinCallback, unique_ptr <SendExceptionFunctor> warningCallback) #endif { if (Initialized) CloseLibrary(); @@ -547,10 +547,10 @@ namespace VeraCrypt status = Pkcs11Functions->C_Initialize (NULL_PTR); if (status != CKR_OK) throw Pkcs11Exception (status); - PinCallback = pinCallback; - WarningCallback = warningCallback; + PinCallback = std::move(pinCallback); + WarningCallback = std::move(warningCallback); Initialized = true; } @@ -727,10 +727,10 @@ namespace VeraCrypt } } #endif // TC_HEADER_Common_Exception - auto_ptr <GetPinFunctor> SecurityToken::PinCallback; - auto_ptr <SendExceptionFunctor> SecurityToken::WarningCallback; + unique_ptr <GetPinFunctor> SecurityToken::PinCallback; + unique_ptr <SendExceptionFunctor> SecurityToken::WarningCallback; bool SecurityToken::Initialized; CK_FUNCTION_LIST_PTR SecurityToken::Pkcs11Functions; map <CK_SLOT_ID, Pkcs11Session> SecurityToken::Sessions; |