Mercurial > hg > orthanc-transfers
comparison Framework/PushMode/ActivePushTransactions.cpp @ 25:dfc43678aecb
replacing deprecated std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 06 Jul 2020 16:25:56 +0200 |
parents | 17f775299b4a |
children | 44a0430d7899 |
comparison
equal
deleted
inserted
replaced
24:065bc476bcdc | 25:dfc43678aecb |
---|---|
19 | 19 |
20 #include "ActivePushTransactions.h" | 20 #include "ActivePushTransactions.h" |
21 | 21 |
22 #include "../DownloadArea.h" | 22 #include "../DownloadArea.h" |
23 | 23 |
24 #include <Compatibility.h> // For std::unique_ptr | |
24 #include <Logging.h> | 25 #include <Logging.h> |
25 | 26 |
26 | 27 |
27 namespace OrthancPlugins | 28 namespace OrthancPlugins |
28 { | 29 { |
128 std::string ActivePushTransactions::CreateTransaction(const std::vector<DicomInstanceInfo>& instances, | 129 std::string ActivePushTransactions::CreateTransaction(const std::vector<DicomInstanceInfo>& instances, |
129 const std::vector<TransferBucket>& buckets, | 130 const std::vector<TransferBucket>& buckets, |
130 BucketCompression compression) | 131 BucketCompression compression) |
131 { | 132 { |
132 std::string uuid = Orthanc::Toolbox::GenerateUuid(); | 133 std::string uuid = Orthanc::Toolbox::GenerateUuid(); |
133 std::auto_ptr<Transaction> tmp(new Transaction(instances, buckets, compression)); | 134 std::unique_ptr<Transaction> tmp(new Transaction(instances, buckets, compression)); |
134 | 135 |
135 LOG(INFO) << "Creating transaction to receive " << instances.size() | 136 LOG(INFO) << "Creating transaction to receive " << instances.size() |
136 << " instances (" << ConvertToMegabytes(tmp->GetDownloadArea().GetTotalSize()) | 137 << " instances (" << ConvertToMegabytes(tmp->GetDownloadArea().GetTotalSize()) |
137 << "MB) in push mode: " << uuid; | 138 << "MB) in push mode: " << uuid; |
138 | 139 |