diff Plugin/DecodedImageAdapter.cpp @ 227:e4def26f0fd3

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 13 Mar 2020 12:38:45 +0100
parents aee499712ac4
children cce89307af28
line wrap: on
line diff
--- a/Plugin/DecodedImageAdapter.cpp	Fri Jan 31 17:41:38 2020 +0100
+++ b/Plugin/DecodedImageAdapter.cpp	Fri Mar 13 12:38:45 2020 +0100
@@ -150,7 +150,9 @@
       throw Orthanc::OrthancException(Orthanc::ErrorCode_UnknownResource);
     }
 
-    std::auto_ptr<OrthancImageWrapper> image(new OrthancImageWrapper(context_, OrthancPluginDecodeDicomImage(context_, dicom.c_str(), dicom.size(), frameIndex)));
+    std::unique_ptr<OrthancImageWrapper> image(
+      new OrthancImageWrapper(context_, OrthancPluginDecodeDicomImage(
+                                context_, dicom.c_str(), dicom.size(), frameIndex)));
 
     Json::Value json;
     if (GetCornerstoneMetadata(json, tags, *image))
@@ -315,7 +317,7 @@
     accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetFormat()), image.GetWidth(),
                             image.GetHeight(), image.GetPitch(), image.GetBuffer());
 
-    std::auto_ptr<Orthanc::ImageBuffer> buffer;
+    std::unique_ptr<Orthanc::ImageBuffer> buffer;
 
     Orthanc::ImageAccessor converted;
 
@@ -427,7 +429,7 @@
     accessor.AssignReadOnly(OrthancPlugins::Convert(image.GetFormat()), image.GetWidth(),
                             image.GetHeight(), image.GetPitch(), image.GetBuffer());
 
-    std::auto_ptr<Orthanc::ImageBuffer> buffer;
+    std::unique_ptr<Orthanc::ImageBuffer> buffer;
 
     Orthanc::ImageAccessor converted;