comparison OrthancServer/Search/DatabaseLookup.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 6358923d3ced
children
comparison
equal deleted inserted replaced
3709:1f4910999fe7 3712:2a170a8f1faf
115 { 115 {
116 return false; 116 return false;
117 } 117 }
118 118
119 std::set<DicomTag> ignoreTagLength; 119 std::set<DicomTag> ignoreTagLength;
120 std::auto_ptr<DicomValue> value(FromDcmtkBridge::ConvertLeafElement 120 std::unique_ptr<DicomValue> value(FromDcmtkBridge::ConvertLeafElement
121 (*element, DicomToJsonFlags_None, 121 (*element, DicomToJsonFlags_None,
122 0, encoding, hasCodeExtensions, ignoreTagLength)); 122 0, encoding, hasCodeExtensions, ignoreTagLength));
123 123
124 // WARNING: Also modify "HierarchicalMatcher::Setup()" if modifying this code 124 // WARNING: Also modify "HierarchicalMatcher::Setup()" if modifying this code
125 if (value.get() == NULL || 125 if (value.get() == NULL ||
126 value->IsNull()) 126 value->IsNull())
127 { 127 {
183 // http://www.itk.org/Wiki/DICOM_QueryRetrieve_Explained 183 // http://www.itk.org/Wiki/DICOM_QueryRetrieve_Explained
184 // http://dicomiseasy.blogspot.be/2012/01/dicom-queryretrieve-part-i.html 184 // http://dicomiseasy.blogspot.be/2012/01/dicom-queryretrieve-part-i.html
185 fixedTag = DICOM_TAG_MODALITY; 185 fixedTag = DICOM_TAG_MODALITY;
186 } 186 }
187 187
188 std::auto_ptr<DicomTagConstraint> constraint 188 std::unique_ptr<DicomTagConstraint> constraint
189 (new DicomTagConstraint(fixedTag, ConstraintType_List, caseSensitive, mandatoryTag)); 189 (new DicomTagConstraint(fixedTag, ConstraintType_List, caseSensitive, mandatoryTag));
190 190
191 std::vector<std::string> items; 191 std::vector<std::string> items;
192 Toolbox::TokenizeString(items, dicomQuery, '\\'); 192 Toolbox::TokenizeString(items, dicomQuery, '\\');
193 193