diff Framework/Deprecated/Toolbox/DicomFrameConverter.cpp @ 1298:8a0a62189f46

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 16:31:30 +0100
parents 2d8ab34c8c91
children 30deba7bc8e2
line wrap: on
line diff
--- a/Framework/Deprecated/Toolbox/DicomFrameConverter.cpp	Sun Feb 23 15:25:49 2020 +0100
+++ b/Framework/Deprecated/Toolbox/DicomFrameConverter.cpp	Mon Mar 02 16:31:30 2020 +0100
@@ -174,7 +174,7 @@
   }
     
 
-  void DicomFrameConverter::ConvertFrameInplace(std::auto_ptr<Orthanc::ImageAccessor>& source) const
+  void DicomFrameConverter::ConvertFrameInplace(std::unique_ptr<Orthanc::ImageAccessor>& source) const
   {
     assert(sizeof(float) == 4);
 
@@ -210,7 +210,7 @@
     if (sourceFormat == Orthanc::PixelFormat_RGB24)
     {
       // This is the case of a color image. No conversion has to be done (*)
-      std::auto_ptr<Orthanc::Image> converted(new Orthanc::Image(Orthanc::PixelFormat_RGB24, 
+      std::unique_ptr<Orthanc::Image> converted(new Orthanc::Image(Orthanc::PixelFormat_RGB24, 
                                                                  source.GetWidth(), 
                                                                  source.GetHeight(),
                                                                  false));
@@ -224,7 +224,7 @@
              sourceFormat == Orthanc::PixelFormat_SignedGrayscale16);
 
       // This is the case of a grayscale frame. Convert it to Float32.
-      std::auto_ptr<Orthanc::Image> converted(new Orthanc::Image(Orthanc::PixelFormat_Float32, 
+      std::unique_ptr<Orthanc::Image> converted(new Orthanc::Image(Orthanc::PixelFormat_Float32, 
                                                                  source.GetWidth(), 
                                                                  source.GetHeight(),
                                                                  false));