diff OrthancServer/UnitTestsSources/ServerJobsTests.cpp @ 4508:8f9090b137f1

Optimization in C-STORE SCP by avoiding an unnecessary DICOM parsing
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 11 Feb 2021 11:00:05 +0100
parents d9473bd5ed43
children 2e850edf03d6
line wrap: on
line diff
--- a/OrthancServer/UnitTestsSources/ServerJobsTests.cpp	Thu Feb 11 09:33:48 2021 +0100
+++ b/OrthancServer/UnitTestsSources/ServerJobsTests.cpp	Thu Feb 11 11:00:05 2021 +0100
@@ -535,10 +535,9 @@
       dicom.Replace(DICOM_TAG_PATIENT_NAME, std::string("JODOGNE"),
                     false, DicomReplaceMode_InsertIfAbsent, "");
 
-      DicomInstanceToStore toStore;
-      toStore.SetParsedDicomFile(dicom);
+      std::unique_ptr<DicomInstanceToStore> toStore(DicomInstanceToStore::CreateFromParsedDicomFile(dicom));
 
-      return (context_->Store(id, toStore, StoreInstanceMode_Default) == StoreStatus_Success);
+      return (context_->Store(id, *toStore, StoreInstanceMode_Default) == StoreStatus_Success);
     }
   };
 }