diff OrthancServer/Internals/FindScp.cpp @ 1789:bdcc1dba4a53 worklists

optimization
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 18 Nov 2015 16:38:08 +0100
parents 6a2d507ef064
children 4f01c9d73f02
line wrap: on
line diff
--- a/OrthancServer/Internals/FindScp.cpp	Wed Nov 18 16:11:28 2015 +0100
+++ b/OrthancServer/Internals/FindScp.cpp	Wed Nov 18 16:38:08 2015 +0100
@@ -186,11 +186,7 @@
       {
         // There are pending results that are still to be sent
         response->DimseStatus = STATUS_Pending;
-
-        DcmFileFormat& fileFormat = data.answers_.GetAnswer(responseCount - 1).GetDcmtkObject();
-
-        // TODO Is there a way to avoid this copy?
-        *responseIdentifiers = new DcmDataset(*fileFormat.getDataset());
+        *responseIdentifiers = data.answers_.ExtractDcmDataset(responseCount - 1);
       }
       else if (data.noCroppingOfResults_)
       {