diff Core/DicomFormat/DicomMap.cpp @ 3712:2a170a8f1faf

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 15:32:45 +0100
parents a9ce35d67c3c
children 56f2397f027a
line wrap: on
line diff
--- a/Core/DicomFormat/DicomMap.cpp	Fri Feb 28 13:23:11 2020 +0100
+++ b/Core/DicomFormat/DicomMap.cpp	Mon Mar 02 15:32:45 2020 +0100
@@ -37,6 +37,7 @@
 #include <stdio.h>
 #include <memory>
 
+#include "../Compatibility.h"
 #include "../Endianness.h"
 #include "../Logging.h"
 #include "../OrthancException.h"
@@ -300,7 +301,7 @@
 
   DicomMap* DicomMap::Clone() const
   {
-    std::auto_ptr<DicomMap> result(new DicomMap);
+    std::unique_ptr<DicomMap> result(new DicomMap);
 
     for (Content::const_iterator it = content_.begin(); it != content_.end(); ++it)
     {
@@ -1165,7 +1166,7 @@
         throw OrthancException(ErrorCode_BadFileFormat);
       }
 
-      std::auto_ptr<DicomValue> value(new DicomValue);
+      std::unique_ptr<DicomValue> value(new DicomValue);
       value->Unserialize(source[tags[i]]);
 
       content_[tag] = value.release();