comparison ViewerPlugin/Plugin.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 b0bd22077cd8
children e12a4588d4bd
comparison
equal deleted inserted replaced
198:2d3fe6967894 199:a1c265cb2174
23 23
24 #include "../Framework/Jpeg2000Reader.h" 24 #include "../Framework/Jpeg2000Reader.h"
25 #include "DicomPyramidCache.h" 25 #include "DicomPyramidCache.h"
26 #include "OrthancPluginConnection.h" 26 #include "OrthancPluginConnection.h"
27 27
28 #include <Compatibility.h> // For std::unique_ptr
28 #include <Logging.h> 29 #include <Logging.h>
29 #include <Images/ImageProcessing.h> 30 #include <Images/ImageProcessing.h>
30 #include <Images/PngWriter.h> 31 #include <Images/PngWriter.h>
31 #include <MultiThreading/Semaphore.h> 32 #include <MultiThreading/Semaphore.h>
32 #include <OrthancException.h> 33 #include <OrthancException.h>
36 37
37 #include <EmbeddedResources.h> 38 #include <EmbeddedResources.h>
38 39
39 #include <cassert> 40 #include <cassert>
40 41
41 std::auto_ptr<OrthancWSI::OrthancPluginConnection> orthanc_; 42 std::unique_ptr<OrthancWSI::OrthancPluginConnection> orthanc_;
42 std::auto_ptr<OrthancWSI::DicomPyramidCache> cache_; 43 std::unique_ptr<OrthancWSI::DicomPyramidCache> cache_;
43 std::auto_ptr<Orthanc::Semaphore> transcoderSemaphore_; 44 std::unique_ptr<Orthanc::Semaphore> transcoderSemaphore_;
44 45
45 46
46 static void AnswerSparseTile(OrthancPluginRestOutput* output, 47 static void AnswerSparseTile(OrthancPluginRestOutput* output,
47 unsigned int tileWidth, 48 unsigned int tileWidth,
48 unsigned int tileHeight) 49 unsigned int tileHeight)
181 } 182 }
182 183
183 184
184 // The tile does not come from a DICOM-JPEG instance, we need to 185 // The tile does not come from a DICOM-JPEG instance, we need to
185 // decompress the raw tile 186 // decompress the raw tile
186 std::auto_ptr<Orthanc::ImageAccessor> decoded; 187 std::unique_ptr<Orthanc::ImageAccessor> decoded;
187 188
188 Orthanc::Semaphore::Locker locker(*transcoderSemaphore_); 189 Orthanc::Semaphore::Locker locker(*transcoderSemaphore_);
189 190
190 switch (compression) 191 switch (compression)
191 { 192 {