diff Framework/Oracle/ThreadedOracle.cpp @ 1308:adf234ecaa00 broker

Merge
author Benjamin Golinvaux <bgo@osimis.io>
date Wed, 04 Mar 2020 10:21:54 +0100
parents 257f2c9a02ac
children 297e57d3508c
line wrap: on
line diff
--- a/Framework/Oracle/ThreadedOracle.cpp	Wed Mar 04 10:07:37 2020 +0100
+++ b/Framework/Oracle/ThreadedOracle.cpp	Wed Mar 04 10:21:54 2020 +0100
@@ -32,7 +32,7 @@
   {
   private:
     boost::weak_ptr<IObserver>      receiver_;
-    std::auto_ptr<IOracleCommand>   command_;
+    std::unique_ptr<IOracleCommand>   command_;
 
   public:
     Item(boost::weak_ptr<IObserver> receiver,
@@ -66,7 +66,7 @@
     {
     private:
       boost::weak_ptr<IObserver>         receiver_;
-      std::auto_ptr<SleepOracleCommand>  command_;
+      std::unique_ptr<SleepOracleCommand>  command_;
       boost::posix_time::ptime           expiration_;
 
     public:
@@ -154,7 +154,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)
     {
@@ -164,7 +164,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())
         {
@@ -412,7 +412,7 @@
   bool ThreadedOracle::Schedule(boost::shared_ptr<IObserver> receiver,
                                 IOracleCommand* command)
   {
-    std::auto_ptr<Item> item(new Item(receiver, command));
+    std::unique_ptr<Item> item(new Item(receiver, command));
 
     {
       boost::mutex::scoped_lock lock(mutex_);