Mercurial > hg > orthanc-wsi
diff Applications/ApplicationToolbox.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 | 1e864138f0da |
line wrap: on
line diff
--- a/Applications/ApplicationToolbox.cpp Mon Jul 06 16:17:09 2020 +0200 +++ b/Applications/ApplicationToolbox.cpp Mon Jul 06 16:29:41 2020 +0200 @@ -24,6 +24,7 @@ #include "../Framework/Inputs/OpenSlideLibrary.h" #include "../Framework/MultiThreading/BagOfTasksProcessor.h" +#include <Compatibility.h> // For std::unique_ptr #include <DicomParsing/FromDcmtkBridge.h> #include <HttpClient.h> #include <Logging.h> @@ -107,7 +108,7 @@ LOG(WARNING) << "Running " << tasks.GetSize() << " tasks"; LOG(WARNING) << "Using " << threadsCount << " threads for the computation"; Orthanc::BagOfTasksProcessor processor(threadsCount); - std::auto_ptr<Orthanc::BagOfTasksProcessor::Handle> handle(processor.Submit(tasks)); + std::unique_ptr<Orthanc::BagOfTasksProcessor::Handle> handle(processor.Submit(tasks)); // Start a thread to display the progress bool done = false; @@ -144,7 +145,7 @@ // No multithreading while (!tasks.IsEmpty()) { - std::auto_ptr<Orthanc::ICommand> task(tasks.Pop()); + std::unique_ptr<Orthanc::ICommand> task(tasks.Pop()); if (task->Execute()) { unsigned int progress = static_cast<unsigned int>(100.0f *