diff UnitTestsSources/ImageToolboxTests.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 86400fa16091
children 30deba7bc8e2
line wrap: on
line diff
--- a/UnitTestsSources/ImageToolboxTests.cpp	Sun Feb 23 15:25:49 2020 +0100
+++ b/UnitTestsSources/ImageToolboxTests.cpp	Mon Mar 02 16:31:30 2020 +0100
@@ -23,6 +23,7 @@
 // #include <boost/chrono.hpp>
 // #include <boost/lexical_cast.hpp>
 
+#include <Core/Compatibility.h>
 #include <Core/Images/Image.h>
 #include <Core/Images/PixelTraits.h>
 
@@ -52,7 +53,7 @@
 
   size_t pixCounter = 0;
 
-  std::auto_ptr<Orthanc::Image> image(new Orthanc::Image(
+  std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
     Orthanc::PixelFormat_Grayscale8, W, H, false));
 
   for (unsigned int y = 0; y < H; ++y)
@@ -92,7 +93,7 @@
 
   size_t pixCounter = 0;
 
-  std::auto_ptr<Orthanc::Image> image(new Orthanc::Image(
+  std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
     Orthanc::PixelFormat_Grayscale8, W, H, false));
 
   for (unsigned int y = 0; y < H; ++y)
@@ -133,7 +134,7 @@
 
   size_t pixCounter = 0;
 
-  std::auto_ptr<Orthanc::Image> image(new Orthanc::Image(
+  std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
     Format, W, H, false));
 
   typedef typename Orthanc::PixelTraits<Format>::PixelType PixelType;
@@ -203,7 +204,7 @@
 
   size_t pixCounter = 0;
 
-  std::auto_ptr<Orthanc::Image> image(new Orthanc::Image(
+  std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
     Format, W, H, false));
 
   typedef typename Orthanc::PixelTraits<Format>::PixelType PixelType;