Mercurial > hg > orthanc-stone
diff Framework/Deprecated/Toolbox/MessagingToolbox.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 | 3d26447ddd28 |
line wrap: on
line diff
--- a/Framework/Deprecated/Toolbox/MessagingToolbox.cpp Sun Feb 23 15:25:49 2020 +0100 +++ b/Framework/Deprecated/Toolbox/MessagingToolbox.cpp Mon Mar 02 16:31:30 2020 +0100 @@ -251,7 +251,7 @@ throw Orthanc::OrthancException(Orthanc::ErrorCode_ParameterOutOfRange); } - std::auto_ptr<Orthanc::PngReader> result(new Orthanc::PngReader); + std::unique_ptr<Orthanc::PngReader> result(new Orthanc::PngReader); result->ReadFromMemory(compressed); if (targetFormat == Orthanc::PixelFormat_SignedGrayscale16) @@ -328,7 +328,7 @@ std::string jpeg; Orthanc::Toolbox::DecodeBase64(jpeg, info["PixelData"].asString()); - std::auto_ptr<Orthanc::JpegReader> reader(new Orthanc::JpegReader); + std::unique_ptr<Orthanc::JpegReader> reader(new Orthanc::JpegReader); reader->ReadFromMemory(jpeg); if (reader->GetFormat() == Orthanc::PixelFormat_RGB24) // This is a color image @@ -386,7 +386,7 @@ } // Decode a grayscale JPEG 8bpp image coming from the Web viewer - std::auto_ptr<Orthanc::ImageAccessor> image + std::unique_ptr<Orthanc::ImageAccessor> image (new Orthanc::Image(targetFormat, reader->GetWidth(), reader->GetHeight(), false)); float scaling = static_cast<float>(stretchHigh - stretchLow) / 255.0f;