Mercurial > hg > orthanc
comparison Core/Cache/MemoryCache.h @ 3712:2a170a8f1faf
replacing std::auto_ptr by std::unique_ptr
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 02 Mar 2020 15:32:45 +0100 |
parents | 94f4a18a79cc |
children |
comparison
equal
deleted
inserted
replaced
3709:1f4910999fe7 | 3712:2a170a8f1faf |
---|---|
31 **/ | 31 **/ |
32 | 32 |
33 | 33 |
34 #pragma once | 34 #pragma once |
35 | 35 |
36 #include "../Compatibility.h" | |
37 #include "ICachePageProvider.h" | |
38 #include "LeastRecentlyUsedIndex.h" | |
39 | |
36 #include <memory> | 40 #include <memory> |
37 #include "LeastRecentlyUsedIndex.h" | |
38 #include "ICachePageProvider.h" | |
39 | 41 |
40 namespace Orthanc | 42 namespace Orthanc |
41 { | 43 { |
42 namespace Deprecated | 44 namespace Deprecated |
43 { | 45 { |
48 { | 50 { |
49 private: | 51 private: |
50 struct Page | 52 struct Page |
51 { | 53 { |
52 std::string id_; | 54 std::string id_; |
53 std::auto_ptr<IDynamicObject> content_; | 55 std::unique_ptr<IDynamicObject> content_; |
54 }; | 56 }; |
55 | 57 |
56 ICachePageProvider& provider_; | 58 ICachePageProvider& provider_; |
57 size_t cacheSize_; | 59 size_t cacheSize_; |
58 LeastRecentlyUsedIndex<std::string, Page*> index_; | 60 LeastRecentlyUsedIndex<std::string, Page*> index_; |