Mercurial > hg > orthanc-stone
comparison Platforms/Generic/Oracle.cpp @ 1299:c38c89684d83 broker
replacing std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 02 Mar 2020 17:21:24 +0100 |
parents | 2d8ab34c8c91 |
children |
comparison
equal
deleted
inserted
replaced
1297:6ab03e429f06 | 1299:c38c89684d83 |
---|---|
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 } |