Mercurial > hg > orthanc-stone
diff Framework/Deprecated/SmartLoader.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 | 257f2c9a02ac |
line wrap: on
line diff
--- a/Framework/Deprecated/SmartLoader.cpp Sun Feb 23 15:25:49 2020 +0100 +++ b/Framework/Deprecated/SmartLoader.cpp Mon Mar 02 16:31:30 2020 +0100 @@ -62,7 +62,7 @@ }; unsigned int sliceIndex_; - std::auto_ptr<Slice> slice_; + std::unique_ptr<Slice> slice_; boost::shared_ptr<Orthanc::ImageAccessor> image_; SliceImageQuality effectiveQuality_; CachedSliceStatus status_; @@ -140,7 +140,7 @@ // the messages to its observables // in both cases, we must be carefull about objects lifecycle !!! - std::auto_ptr<IVolumeSlicer> layerSource; + std::unique_ptr<IVolumeSlicer> layerSource; std::string sliceKeyId = instanceId + ":" + boost::lexical_cast<std::string>(frame); SmartLoader::CachedSlice* cachedSlice = NULL; @@ -199,7 +199,7 @@ cachedSlices_[sliceKeyId] = boost::shared_ptr<CachedSlice>(cachedSlice); - std::auto_ptr<IVolumeSlicer> layerSource(new DicomSeriesVolumeSlicer(IObserver::GetBroker(), orthancApiClient_)); + std::unique_ptr<IVolumeSlicer> layerSource(new DicomSeriesVolumeSlicer(IObserver::GetBroker(), orthancApiClient_)); dynamic_cast<DicomSeriesVolumeSlicer*>(layerSource.get())->SetImageQuality(imageQuality_); layerSource->RegisterObserverCallback(new OrthancStone::Callable<SmartLoader, IVolumeSlicer::GeometryReadyMessage>(*this, &SmartLoader::OnLayerGeometryReady));