Mercurial > hg > orthanc-stone
diff Framework/Oracle/WebAssemblyOracle.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 | 2d8ab34c8c91 |
children | 257f2c9a02ac |
line wrap: on
line diff
--- a/Framework/Oracle/WebAssemblyOracle.cpp Sun Feb 23 15:25:49 2020 +0100 +++ b/Framework/Oracle/WebAssemblyOracle.cpp Mon Mar 02 16:31:30 2020 +0100 @@ -43,7 +43,7 @@ private: WebAssemblyOracle& oracle_; const IObserver& receiver_; - std::auto_ptr<SleepOracleCommand> command_; + std::unique_ptr<SleepOracleCommand> command_; public: TimeoutContext(WebAssemblyOracle& oracle, @@ -70,7 +70,7 @@ static void Callback(void *userData) { - std::auto_ptr<TimeoutContext> context(reinterpret_cast<TimeoutContext*>(userData)); + std::unique_ptr<TimeoutContext> context(reinterpret_cast<TimeoutContext*>(userData)); context->EmitMessage(); } }; @@ -110,7 +110,7 @@ private: Emitter emitter_; const IObserver& receiver_; - std::auto_ptr<IOracleCommand> command_; + std::unique_ptr<IOracleCommand> command_; std::string expectedContentType_; int64_t receiverFingerprint_; @@ -213,7 +213,7 @@ * free data associated with the fetch. **/ - std::auto_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); + std::unique_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); // an UUID is 36 chars : 32 hex chars + 4 hyphens: char #0 --> char #35 // char #36 is \0. @@ -352,7 +352,7 @@ static void FailureCallback(emscripten_fetch_t *fetch) { - std::auto_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); + std::unique_ptr<FetchContext> context(reinterpret_cast<FetchContext*>(fetch->userData)); { const size_t kEmscriptenStatusTextSize = sizeof(emscripten_fetch_t::statusText); @@ -389,7 +389,7 @@ private: WebAssemblyOracle& oracle_; const IObserver& receiver_; - std::auto_ptr<IOracleCommand> command_; + std::unique_ptr<IOracleCommand> command_; Orthanc::HttpMethod method_; std::string url_; std::string body_; @@ -702,7 +702,7 @@ << std::hex << &receiver << std::dec << " | Current fingerprint is " << receiver.GetFingerprint(); - std::auto_ptr<IOracleCommand> protection(command); + std::unique_ptr<IOracleCommand> protection(command); if (command == NULL) {