Mercurial > hg > orthanc
changeset 5109:027366cae766
cppcheck
author | Alain Mazy <am@osimis.io> |
---|---|
date | Tue, 22 Nov 2022 12:57:10 +0100 |
parents | a386dfb5b386 |
children | 98da039474b1 |
files | OrthancServer/Resources/RunCppCheck.sh OrthancServer/Sources/ServerJobs/ArchiveJob.cpp |
diffstat | 2 files changed, 8 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/Resources/RunCppCheck.sh Tue Nov 22 12:54:10 2022 +0100 +++ b/OrthancServer/Resources/RunCppCheck.sh Tue Nov 22 12:57:10 2022 +0100 @@ -35,7 +35,7 @@ assertWithSideEffect:../../OrthancServer/Plugins/Engine/OrthancPluginDatabase.cpp:1018 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:289 assertWithSideEffect:../../OrthancServer/Sources/Database/Compatibility/DatabaseLookup.cpp:388 -assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3460 +assertWithSideEffect:../../OrthancServer/Sources/Database/StatelessDatabaseOperations.cpp:3490 assertWithSideEffect:../../OrthancServer/Sources/ServerJobs/ResourceModificationJob.cpp:241 EOF
--- a/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp Tue Nov 22 12:54:10 2022 +0100 +++ b/OrthancServer/Sources/ServerJobs/ArchiveJob.cpp Tue Nov 22 12:57:10 2022 +0100 @@ -647,23 +647,18 @@ writer.OpenFile(filename_.c_str()); - bool transcodeSuccess = false; - std::unique_ptr<ParsedDicomFile> parsed; - if (!transcodeSuccess) + writer.Write(content); + + if (dicomDir != NULL) { - writer.Write(content); - - if (dicomDir != NULL) + if (parsed.get() == NULL) { - if (parsed.get() == NULL) - { - parsed.reset(new ParsedDicomFile(content)); - } + parsed.reset(new ParsedDicomFile(content)); + } - dicomDir->Add(dicomDirFolder, filename_, *parsed); - } + dicomDir->Add(dicomDirFolder, filename_, *parsed); } break;