Mercurial > hg > orthanc-transfers
diff Framework/OrthancInstancesCache.cpp @ 25:dfc43678aecb
replacing deprecated std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Jul 2020 16:25:56 +0200 |
parents | b06103a50c95 |
children | 44a0430d7899 |
line wrap: on
line diff
--- a/Framework/OrthancInstancesCache.cpp Mon Jul 06 16:23:48 2020 +0200 +++ b/Framework/OrthancInstancesCache.cpp Mon Jul 06 16:25:56 2020 +0200 @@ -19,6 +19,7 @@ #include "OrthancInstancesCache.h" +#include <Compatibility.h> // For std::unique_ptr namespace OrthancPlugins { @@ -119,7 +120,7 @@ void OrthancInstancesCache::Store(const std::string& instanceId, - std::auto_ptr<SourceDicomInstance>& instance) + std::unique_ptr<SourceDicomInstance>& instance) { if (instance.get() == NULL) { @@ -222,7 +223,7 @@ } // The instance was not in the cache, load it - std::auto_ptr<SourceDicomInstance> instance(new SourceDicomInstance(instanceId)); + std::unique_ptr<SourceDicomInstance> instance(new SourceDicomInstance(instanceId)); size = instance->GetInfo().GetSize(); md5 = instance->GetInfo().GetMD5(); @@ -251,7 +252,7 @@ } // The instance was not in the cache, load it - std::auto_ptr<SourceDicomInstance> instance(new SourceDicomInstance(instanceId)); + std::unique_ptr<SourceDicomInstance> instance(new SourceDicomInstance(instanceId)); instance->GetChunk(chunk, md5, 0, instance->GetInfo().GetSize()); // Store the just-loaded DICOM instance into the cache