comparison Platforms/Generic/Oracle.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
comparison
equal deleted inserted replaced
1296:86400fa16091 1298:8a0a62189f46
60 if (state == State_Stopped) 60 if (state == State_Stopped)
61 { 61 {
62 break; 62 break;
63 } 63 }
64 64
65 std::auto_ptr<Orthanc::IDynamicObject> item(that->queue_.Dequeue(100)); 65 std::unique_ptr<Orthanc::IDynamicObject> item(that->queue_.Dequeue(100));
66 if (item.get() != NULL) 66 if (item.get() != NULL)
67 { 67 {
68 IOracleCommand& command = dynamic_cast<IOracleCommand&>(*item); 68 IOracleCommand& command = dynamic_cast<IOracleCommand&>(*item);
69 try 69 try
70 { 70 {
105 return queue_; 105 return queue_;
106 } 106 }
107 107
108 void Submit(IOracleCommand* command) 108 void Submit(IOracleCommand* command)
109 { 109 {
110 std::auto_ptr<IOracleCommand> protection(command); 110 std::unique_ptr<IOracleCommand> protection(command);
111 111
112 if (command == NULL) 112 if (command == NULL)
113 { 113 {
114 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer); 114 throw Orthanc::OrthancException(Orthanc::ErrorCode_NullPointer);
115 } 115 }