Mercurial > hg > orthanc-stone
comparison Framework/Volumes/VolumeSceneLayerSource.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 | 0da659f8579c |
comparison
equal
deleted
inserted
replaced
1296:86400fa16091 | 1298:8a0a62189f46 |
---|---|
94 | 94 |
95 | 95 |
96 void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane) | 96 void VolumeSceneLayerSource::Update(const CoordinateSystem3D& plane) |
97 { | 97 { |
98 assert(slicer_.get() != NULL); | 98 assert(slicer_.get() != NULL); |
99 std::auto_ptr<IVolumeSlicer::IExtractedSlice> slice(slicer_->ExtractSlice(plane)); | 99 std::unique_ptr<IVolumeSlicer::IExtractedSlice> slice(slicer_->ExtractSlice(plane)); |
100 | 100 |
101 if (slice.get() == NULL) | 101 if (slice.get() == NULL) |
102 { | 102 { |
103 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); | 103 throw Orthanc::OrthancException(Orthanc::ErrorCode_InternalError); |
104 } | 104 } |
127 LOG(TRACE) << "VolumeSceneLayerSource::Update -- Content has changed: An update is needed"; | 127 LOG(TRACE) << "VolumeSceneLayerSource::Update -- Content has changed: An update is needed"; |
128 // Content has changed: An update is needed | 128 // Content has changed: An update is needed |
129 lastPlane_.reset(new CoordinateSystem3D(plane)); | 129 lastPlane_.reset(new CoordinateSystem3D(plane)); |
130 lastRevision_ = slice->GetRevision(); | 130 lastRevision_ = slice->GetRevision(); |
131 | 131 |
132 std::auto_ptr<ISceneLayer> layer(slice->CreateSceneLayer(configurator_.get(), plane)); | 132 std::unique_ptr<ISceneLayer> layer(slice->CreateSceneLayer(configurator_.get(), plane)); |
133 if (layer.get() == NULL) | 133 if (layer.get() == NULL) |
134 { | 134 { |
135 LOG(TRACE) << "VolumeSceneLayerSource::Update -- (layer.get() == NULL)"; | 135 LOG(TRACE) << "VolumeSceneLayerSource::Update -- (layer.get() == NULL)"; |
136 ClearLayer(); | 136 ClearLayer(); |
137 } | 137 } |