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/Main/GraphicUserInterface.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Main/GraphicUserInterface.cpp') diff --git a/src/Main/GraphicUserInterface.cpp b/src/Main/GraphicUserInterface.cpp index b7b4cf45..f1bb87b2 100755 --- a/src/Main/GraphicUserInterface.cpp +++ b/src/Main/GraphicUserInterface.cpp @@ -344,7 +344,7 @@ namespace VeraCrypt void GraphicUserInterface::BeginInteractiveBusyState (wxWindow *window) { - static auto_ptr arrowWaitCursor; + static unique_ptr arrowWaitCursor; if (arrowWaitCursor.get() == nullptr) arrowWaitCursor.reset (new wxCursor (wxCURSOR_ARROWWAIT)); @@ -409,7 +409,7 @@ namespace VeraCrypt void GraphicUserInterface::EndInteractiveBusyState (wxWindow *window) const { - static auto_ptr arrowCursor; + static unique_ptr arrowCursor; if (arrowCursor.get() == nullptr) arrowCursor.reset (new wxCursor (wxCURSOR_ARROW)); @@ -632,7 +632,7 @@ namespace VeraCrypt try { - SecurityToken::InitLibrary (Preferences.SecurityTokenModule, auto_ptr (new PinRequestHandler), auto_ptr (new WarningHandler)); + SecurityToken::InitLibrary (Preferences.SecurityTokenModule, unique_ptr (new PinRequestHandler), unique_ptr (new WarningHandler)); } catch (Exception &e) { @@ -965,8 +965,8 @@ namespace VeraCrypt wxConnectionBase *OnMakeConnection () { return new Connection; } }; - auto_ptr client (new Client); - auto_ptr connection (client->MakeConnection (L"localhost", serverName, L"raise")); + unique_ptr client (new Client); + unique_ptr connection (client->MakeConnection (L"localhost", serverName, L"raise")); if (connection.get() && connection->Execute (nullptr)) { -- cgit v1.2.3