diff Platforms/Wasm/WasmWebService.cpp @ 1298:8a0a62189f46

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 16:31:30 +0100
parents 861c080ef47b
children
line wrap: on
line diff
--- a/Platforms/Wasm/WasmWebService.cpp	Sun Feb 23 15:25:49 2020 +0100
+++ b/Platforms/Wasm/WasmWebService.cpp	Mon Mar 02 16:31:30 2020 +0100
@@ -7,7 +7,7 @@
 struct CachedSuccessNotification
 {
   boost::shared_ptr<Deprecated::BaseWebService::CachedHttpRequestSuccessMessage>    cachedMessage;
-  std::auto_ptr<Orthanc::IDynamicObject>                                              payload;
+  std::unique_ptr<Orthanc::IDynamicObject>                                              payload;
   OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestSuccessMessage>* successCallback;
 };
 
@@ -56,7 +56,7 @@
   void EMSCRIPTEN_KEEPALIVE WasmWebService_NotifyCachedSuccess(void* notification_)
   {
     // notification has been allocated in C++ and passed to JS.  It must be deleted by this method
-    std::auto_ptr<CachedSuccessNotification> notification(reinterpret_cast<CachedSuccessNotification*>(notification_));
+    std::unique_ptr<CachedSuccessNotification> notification(reinterpret_cast<CachedSuccessNotification*>(notification_));
 
     notification->successCallback->Apply(Deprecated::IWebService::HttpRequestSuccessMessage(
       notification->cachedMessage->GetUri(),