Mercurial > hg > orthanc
changeset 2730:cb1b26a7db98
fix mingw compilation
author | s.jodogne@gmail.com |
---|---|
date | Fri, 13 Jul 2018 12:34:53 +0200 |
parents | cdf13d06cf40 |
children | fe4fe52f0c94 |
files | OrthancServer/ServerJobs/ArchiveJob.cpp OrthancServer/ServerJobs/ArchiveJob.h OrthancServer/ServerJobs/LuaJobManager.cpp UnitTestsSources/MultiThreadingTests.cpp |
diffstat | 4 files changed, 29 insertions(+), 19 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/ServerJobs/ArchiveJob.cpp Fri Jul 13 10:07:45 2018 +0200 +++ b/OrthancServer/ServerJobs/ArchiveJob.cpp Fri Jul 13 12:34:53 2018 +0200 @@ -844,7 +844,7 @@ if (writer_->GetStepsCount() == 0) { - writer_.reset(NULL); // Flush all the results + writer_.reset(); // Flush all the results return JobStepResult::Success(); } else @@ -855,7 +855,7 @@ if (currentStep_ == writer_->GetStepsCount()) { - writer_.reset(NULL); // Flush all the results + writer_.reset(); // Flush all the results return JobStepResult::Success(); } else
--- a/OrthancServer/ServerJobs/ArchiveJob.h Fri Jul 13 10:07:45 2018 +0200 +++ b/OrthancServer/ServerJobs/ArchiveJob.h Fri Jul 13 12:34:53 2018 +0200 @@ -51,17 +51,17 @@ class ZipWriterIterator; class ZipWriterIterator; - boost::shared_ptr<TemporaryFile> target_; - ServerContext& context_; - std::auto_ptr<ArchiveIndex> archive_; - bool isMedia_; - bool enableExtendedSopClass_; - std::string description_; + boost::shared_ptr<TemporaryFile> target_; + ServerContext& context_; + boost::shared_ptr<ArchiveIndex> archive_; + bool isMedia_; + bool enableExtendedSopClass_; + std::string description_; - std::auto_ptr<ZipWriterIterator> writer_; - size_t currentStep_; - unsigned int instancesCount_; - uint64_t uncompressedSize_; + boost::shared_ptr<ZipWriterIterator> writer_; + size_t currentStep_; + unsigned int instancesCount_; + uint64_t uncompressedSize_; public: ArchiveJob(boost::shared_ptr<TemporaryFile>& target,
--- a/OrthancServer/ServerJobs/LuaJobManager.cpp Fri Jul 13 10:07:45 2018 +0200 +++ b/OrthancServer/ServerJobs/LuaJobManager.cpp Fri Jul 13 12:34:53 2018 +0200 @@ -238,7 +238,8 @@ void LuaJobManager::Lock::AddNullInput(size_t operation) { assert(jobLock_.get() != NULL); - jobLock_->AddInput(operation, NullOperationValue()); + NullOperationValue null; + jobLock_->AddInput(operation, null); } @@ -246,7 +247,8 @@ const std::string& content) { assert(jobLock_.get() != NULL); - jobLock_->AddInput(operation, StringOperationValue(content)); + StringOperationValue value(content); + jobLock_->AddInput(operation, value); } @@ -255,7 +257,8 @@ const std::string& instanceId) { assert(jobLock_.get() != NULL); - jobLock_->AddInput(operation, DicomInstanceOperationValue(context, instanceId)); + DicomInstanceOperationValue value(context, instanceId); + jobLock_->AddInput(operation, value); }
--- a/UnitTestsSources/MultiThreadingTests.cpp Fri Jul 13 10:07:45 2018 +0200 +++ b/UnitTestsSources/MultiThreadingTests.cpp Fri Jul 13 12:34:53 2018 +0200 @@ -707,8 +707,12 @@ size_t i = lock.AddOperation(new LogJobOperation); size_t j = lock.AddOperation(new LogJobOperation); size_t k = lock.AddOperation(new LogJobOperation); - lock.AddInput(i, StringOperationValue("Hello")); - lock.AddInput(i, StringOperationValue("World")); + + StringOperationValue a("Hello"); + StringOperationValue b("World"); + lock.AddInput(i, a); + lock.AddInput(i, b); + lock.Connect(i, j); lock.Connect(j, k); } @@ -1002,8 +1006,11 @@ size_t a = lock.AddOperation(new LogJobOperation); size_t b = lock.AddOperation(new LogJobOperation); lock.Connect(a, b); - lock.AddInput(a, StringOperationValue("hello")); - lock.AddInput(a, StringOperationValue("world")); + + StringOperationValue s1("hello"); + StringOperationValue s2("world"); + lock.AddInput(a, s1); + lock.AddInput(a, s2); lock.SetDicomAssociationTimeout(200); lock.SetTrailingOperationTimeout(300); }