Mercurial > hg > orthanc-stone
comparison 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 |
comparison
equal
deleted
inserted
replaced
1296:86400fa16091 | 1298:8a0a62189f46 |
---|---|
5 #include <boost/shared_ptr.hpp> | 5 #include <boost/shared_ptr.hpp> |
6 | 6 |
7 struct CachedSuccessNotification | 7 struct CachedSuccessNotification |
8 { | 8 { |
9 boost::shared_ptr<Deprecated::BaseWebService::CachedHttpRequestSuccessMessage> cachedMessage; | 9 boost::shared_ptr<Deprecated::BaseWebService::CachedHttpRequestSuccessMessage> cachedMessage; |
10 std::auto_ptr<Orthanc::IDynamicObject> payload; | 10 std::unique_ptr<Orthanc::IDynamicObject> payload; |
11 OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestSuccessMessage>* successCallback; | 11 OrthancStone::MessageHandler<Deprecated::IWebService::HttpRequestSuccessMessage>* successCallback; |
12 }; | 12 }; |
13 | 13 |
14 | 14 |
15 #ifdef __cplusplus | 15 #ifdef __cplusplus |
54 } | 54 } |
55 | 55 |
56 void EMSCRIPTEN_KEEPALIVE WasmWebService_NotifyCachedSuccess(void* notification_) | 56 void EMSCRIPTEN_KEEPALIVE WasmWebService_NotifyCachedSuccess(void* notification_) |
57 { | 57 { |
58 // notification has been allocated in C++ and passed to JS. It must be deleted by this method | 58 // notification has been allocated in C++ and passed to JS. It must be deleted by this method |
59 std::auto_ptr<CachedSuccessNotification> notification(reinterpret_cast<CachedSuccessNotification*>(notification_)); | 59 std::unique_ptr<CachedSuccessNotification> notification(reinterpret_cast<CachedSuccessNotification*>(notification_)); |
60 | 60 |
61 notification->successCallback->Apply(Deprecated::IWebService::HttpRequestSuccessMessage( | 61 notification->successCallback->Apply(Deprecated::IWebService::HttpRequestSuccessMessage( |
62 notification->cachedMessage->GetUri(), | 62 notification->cachedMessage->GetUri(), |
63 notification->cachedMessage->GetAnswer(), | 63 notification->cachedMessage->GetAnswer(), |
64 notification->cachedMessage->GetAnswerSize(), | 64 notification->cachedMessage->GetAnswerSize(), |