comparison Framework/Scene2D/GrayscaleStyleConfigurator.cpp @ 1299:c38c89684d83 broker

replacing std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 02 Mar 2020 17:21:24 +0100
parents 7ec8fea061b9
children 257f2c9a02ac
comparison
equal deleted inserted replaced
1297:6ab03e429f06 1299:c38c89684d83
86 86
87 TextureBaseSceneLayer* GrayscaleStyleConfigurator::CreateTextureFromDicom( 87 TextureBaseSceneLayer* GrayscaleStyleConfigurator::CreateTextureFromDicom(
88 const Orthanc::ImageAccessor& frame, 88 const Orthanc::ImageAccessor& frame,
89 const DicomInstanceParameters& parameters) const 89 const DicomInstanceParameters& parameters) const
90 { 90 {
91 std::auto_ptr<TextureBaseSceneLayer> layer(parameters.CreateTexture(frame)); 91 std::unique_ptr<TextureBaseSceneLayer> layer(parameters.CreateTexture(frame));
92 92
93 if (layer.get() == NULL || 93 if (layer.get() == NULL ||
94 layer->GetTexture().GetFormat() != Orthanc::PixelFormat_Float32) 94 layer->GetTexture().GetFormat() != Orthanc::PixelFormat_Float32)
95 { 95 {
96 throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageFormat); 96 throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageFormat);