Mercurial > hg > orthanc-stone
diff Framework/Oracle/ThreadedOracle.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/ThreadedOracle.cpp Sun Feb 23 15:25:49 2020 +0100 +++ b/Framework/Oracle/ThreadedOracle.cpp Mon Mar 02 16:31:30 2020 +0100 @@ -40,7 +40,7 @@ { private: const IObserver& receiver_; - std::auto_ptr<IOracleCommand> command_; + std::unique_ptr<IOracleCommand> command_; public: Item(const IObserver& receiver, @@ -74,7 +74,7 @@ { private: const IObserver& receiver_; - std::auto_ptr<SleepOracleCommand> command_; + std::unique_ptr<SleepOracleCommand> command_; boost::posix_time::ptime expiration_; public: @@ -310,7 +310,7 @@ void ThreadedOracle::Step() { - std::auto_ptr<Orthanc::IDynamicObject> object(queue_.Dequeue(100)); + std::unique_ptr<Orthanc::IDynamicObject> object(queue_.Dequeue(100)); if (object.get() != NULL) { @@ -324,7 +324,7 @@ { SleepOracleCommand& command = dynamic_cast<SleepOracleCommand&>(item.GetCommand()); - std::auto_ptr<SleepOracleCommand> copy(new SleepOracleCommand(command.GetDelay())); + std::unique_ptr<SleepOracleCommand> copy(new SleepOracleCommand(command.GetDelay())); if (command.HasPayload()) {