comparison Framework/Scene2D/GrayscaleStyleConfigurator.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
comparison
equal deleted inserted replaced
1296:86400fa16091 1298:8a0a62189f46
68 68
69 TextureBaseSceneLayer* GrayscaleStyleConfigurator::CreateTextureFromDicom( 69 TextureBaseSceneLayer* GrayscaleStyleConfigurator::CreateTextureFromDicom(
70 const Orthanc::ImageAccessor& frame, 70 const Orthanc::ImageAccessor& frame,
71 const DicomInstanceParameters& parameters) const 71 const DicomInstanceParameters& parameters) const
72 { 72 {
73 std::auto_ptr<TextureBaseSceneLayer> layer(parameters.CreateTexture(frame)); 73 std::unique_ptr<TextureBaseSceneLayer> layer(parameters.CreateTexture(frame));
74 74
75 if (layer.get() == NULL || 75 if (layer.get() == NULL ||
76 layer->GetTexture().GetFormat() != Orthanc::PixelFormat_Float32) 76 layer->GetTexture().GetFormat() != Orthanc::PixelFormat_Float32)
77 { 77 {
78 throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageFormat); 78 throw Orthanc::OrthancException(Orthanc::ErrorCode_IncompatibleImageFormat);