comparison OrthancFramework/Sources/DicomParsing/FromDcmtkBridge.cpp @ 4200:7112a8af0b63

cppcheck
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 16 Sep 2020 20:53:31 +0200
parents 0ddc5297a8ab
children 785a2713323e
comparison
equal deleted inserted replaced
4199:fbc49a65340a 4200:7112a8af0b63
1887 } 1887 }
1888 1888
1889 if (tag != DICOM_TAG_SPECIFIC_CHARACTER_SET) 1889 if (tag != DICOM_TAG_SPECIFIC_CHARACTER_SET)
1890 { 1890 {
1891 std::unique_ptr<DcmElement> element(FromDcmtkBridge::FromJson(tag, value, decodeDataUriScheme, encoding, privateCreator)); 1891 std::unique_ptr<DcmElement> element(FromDcmtkBridge::FromJson(tag, value, decodeDataUriScheme, encoding, privateCreator));
1892 const DcmTagKey& tag = element->getTag(); 1892
1893 1893 result->findAndDeleteElement(element->getTag());
1894 result->findAndDeleteElement(tag);
1895 1894
1896 DcmElement* tmp = element.release(); 1895 DcmElement* tmp = element.release();
1897 if (!result->insert(tmp, false, false).good()) 1896 if (!result->insert(tmp, false, false).good())
1898 { 1897 {
1899 delete tmp; 1898 delete tmp;