diff OrthancServer/Sources/ServerJobs/ArchiveJob.cpp @ 5109:027366cae766

cppcheck
author Alain Mazy <am@osimis.io>
date Tue, 22 Nov 2022 12:57:10 +0100
parents a386dfb5b386
children 8b74aa4f3515
line wrap: on
line diff
--- 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;