Skip to content

Commit

Permalink
fix unique_ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
KinderRiven committed Aug 10, 2022
1 parent 9b7f876 commit 1aa7bbc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Common/IFileCachePriority.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class IFileCachePriority
public:
class IIterator;
using Key = FileCacheKey;
using ReadIterator = std::shared_ptr<const IIterator>;
using ReadIterator = std::unique_ptr<const IIterator>;
using WriteIterator = std::shared_ptr<IIterator>;

struct FileCacheRecord
Expand Down
2 changes: 1 addition & 1 deletion src/Common/LRUFileCachePriority.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void LRUFileCachePriority::removeAll(std::lock_guard<std::mutex> &)

IFileCachePriority::ReadIterator LRUFileCachePriority::getLowestPriorityReadIterator(std::lock_guard<std::mutex> &)
{
return std::make_shared<const LRUFileCacheIterator>(this, queue.begin());
return std::make_unique<const LRUFileCacheIterator>(this, queue.begin());
}

IFileCachePriority::WriteIterator LRUFileCachePriority::getLowestPriorityWriteIterator(std::lock_guard<std::mutex> &)
Expand Down

0 comments on commit 1aa7bbc

Please sign in to comment.