comparison Framework/Jpeg2000Reader.cpp @ 199:a1c265cb2174

replacing deprecated std::auto_ptr by std::unique_ptr
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 06 Jul 2020 16:29:41 +0200
parents f299c191cd76
children 628201cb48c2
comparison
equal deleted inserted replaced
198:2d3fe6967894 199:a1c265cb2174
20 20
21 21
22 #include "PrecompiledHeadersWSI.h" 22 #include "PrecompiledHeadersWSI.h"
23 #include "Jpeg2000Reader.h" 23 #include "Jpeg2000Reader.h"
24 24
25 #include "ImageToolbox.h"
26
27 #include <Compatibility.h> // For std::unique_ptr
25 #include <OrthancException.h> 28 #include <OrthancException.h>
26 #include <SystemToolbox.h> 29 #include <SystemToolbox.h>
27 #include "ImageToolbox.h"
28 30
29 #include <cassert> 31 #include <cassert>
30 #include <string.h> 32 #include <string.h>
31 #include <openjpeg.h> 33 #include <openjpeg.h>
32 34
398 else 400 else
399 { 401 {
400 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented); 402 throw Orthanc::OrthancException(Orthanc::ErrorCode_NotImplemented);
401 } 403 }
402 404
403 std::auto_ptr<Orthanc::ImageAccessor> image(ImageToolbox::Allocate(format, width, height)); 405 std::unique_ptr<Orthanc::ImageAccessor> image(ImageToolbox::Allocate(format, width, height));
404 406
405 switch (format) 407 switch (format)
406 { 408 {
407 case Orthanc::PixelFormat_Grayscale8: 409 case Orthanc::PixelFormat_Grayscale8:
408 { 410 {