comparison Core/DicomNetworking/DicomFindAnswers.cpp @ 3712:2a170a8f1faf

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 15:32:45 +0100
parents 94f4a18a79cc
children 884b55ce01f6
comparison
equal deleted inserted replaced
3709:1f4910999fe7 3712:2a170a8f1faf
44 44
45 namespace Orthanc 45 namespace Orthanc
46 { 46 {
47 void DicomFindAnswers::AddAnswerInternal(ParsedDicomFile* answer) 47 void DicomFindAnswers::AddAnswerInternal(ParsedDicomFile* answer)
48 { 48 {
49 std::auto_ptr<ParsedDicomFile> protection(answer); 49 std::unique_ptr<ParsedDicomFile> protection(answer);
50 50
51 if (isWorklist_) 51 if (isWorklist_)
52 { 52 {
53 // These lines are necessary when serving worklists, otherwise 53 // These lines are necessary when serving worklists, otherwise
54 // Orthanc does not behave as "wlmscpfs" 54 // Orthanc does not behave as "wlmscpfs"
164 // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3 164 // http://dicom.nema.org/medical/dicom/current/output/chtml/part04/sect_C.4.html#sect_C.4.1.1.3
165 // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ 165 // https://groups.google.com/d/msg/orthanc-users/D3kpPuX8yV0/_zgHOzkMEQAJ
166 166
167 DcmDataset& source = *GetAnswer(index).GetDcmtkObject().getDataset(); 167 DcmDataset& source = *GetAnswer(index).GetDcmtkObject().getDataset();
168 168
169 std::auto_ptr<DcmDataset> target(new DcmDataset); 169 std::unique_ptr<DcmDataset> target(new DcmDataset);
170 170
171 for (unsigned long i = 0; i < source.card(); i++) 171 for (unsigned long i = 0; i < source.card(); i++)
172 { 172 {
173 const DcmElement* element = source.getElement(i); 173 const DcmElement* element = source.getElement(i);
174 assert(element != NULL); 174 assert(element != NULL);