Mercurial > hg > orthanc-webviewer
diff Plugin/Cache/CacheScheduler.cpp @ 266:4e9d30c19b4b
linking against orthanc framework library
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 10 Jun 2020 12:32:46 +0200 |
parents | aee499712ac4 |
children | e376158e2dbb |
line wrap: on
line diff
--- a/Plugin/Cache/CacheScheduler.cpp Mon Jun 08 18:05:15 2020 +0200 +++ b/Plugin/Cache/CacheScheduler.cpp Wed Jun 10 12:32:46 2020 +0200 @@ -23,7 +23,8 @@ #include "CacheIndex.h" -#include <Core/OrthancException.h> +#include <Compatibility.h> +#include <OrthancException.h> #include <stdio.h> namespace OrthancPlugins @@ -74,7 +75,7 @@ DynamicString* Dequeue(int32_t msTimeout) { - std::auto_ptr<Orthanc::IDynamicObject> message(queue_.Dequeue(msTimeout)); + std::unique_ptr<Orthanc::IDynamicObject> message(queue_.Dequeue(msTimeout)); if (message.get() == NULL) { return NULL; @@ -111,7 +112,7 @@ { while (!(that->done_)) { - std::auto_ptr<DynamicString> prefetch(that->queue_.Dequeue(500)); + std::unique_ptr<DynamicString> prefetch(that->queue_.Dequeue(500)); try { @@ -218,9 +219,9 @@ class CacheScheduler::BundleScheduler { private: - std::auto_ptr<ICacheFactory> factory_; - PrefetchQueue queue_; - std::vector<Prefetcher*> prefetchers_; + std::unique_ptr<ICacheFactory> factory_; + PrefetchQueue queue_; + std::vector<Prefetcher*> prefetchers_; public: BundleScheduler(int bundleIndex, @@ -296,8 +297,7 @@ CacheScheduler::CacheScheduler(CacheManager& cache, unsigned int maxPrefetchSize) : maxPrefetchSize_(maxPrefetchSize), - cache_(cache), - policy_(NULL) + cache_(cache) { }