From 1aa7bbcbbd8b8c0bbd4f4dca6bc35ebde7837945 Mon Sep 17 00:00:00 2001 From: KinderRiven Date: Wed, 10 Aug 2022 23:19:26 +0800 Subject: [PATCH] fix unique_ptr --- src/Common/IFileCachePriority.h | 2 +- src/Common/LRUFileCachePriority.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Common/IFileCachePriority.h b/src/Common/IFileCachePriority.h index 59ce3c0aebb..f80266f9eea 100644 --- a/src/Common/IFileCachePriority.h +++ b/src/Common/IFileCachePriority.h @@ -18,7 +18,7 @@ class IFileCachePriority public: class IIterator; using Key = FileCacheKey; - using ReadIterator = std::shared_ptr; + using ReadIterator = std::unique_ptr; using WriteIterator = std::shared_ptr; struct FileCacheRecord diff --git a/src/Common/LRUFileCachePriority.cpp b/src/Common/LRUFileCachePriority.cpp index c54b65f6ee0..b4c4bfa338b 100644 --- a/src/Common/LRUFileCachePriority.cpp +++ b/src/Common/LRUFileCachePriority.cpp @@ -45,7 +45,7 @@ void LRUFileCachePriority::removeAll(std::lock_guard &) IFileCachePriority::ReadIterator LRUFileCachePriority::getLowestPriorityReadIterator(std::lock_guard &) { - return std::make_shared(this, queue.begin()); + return std::make_unique(this, queue.begin()); } IFileCachePriority::WriteIterator LRUFileCachePriority::getLowestPriorityWriteIterator(std::lock_guard &)