| 762 | // doesn't support promotion |
| 763 | template <typename TKey, typename TValue, typename TWeight, typename TWeighter, typename TDeleter = TNoopDelete, typename TAllocator = std::allocator<typename TLWList<TKey, TValue, TWeight, TWeighter>::TItem>> |
| 764 | class TLWCache: public TCache<TKey, TValue, TLWList<TKey, TValue, TWeight, TWeighter>, TDeleter, TAllocator> { |
| 765 | typedef TCache<TKey, TValue, TLWList<TKey, TValue, TWeight, TWeighter>, TDeleter, TAllocator> TBase; |
| 766 | using TListType = TLWList<TKey, TValue, TWeight, TWeighter>; |
| 767 | |
| 768 | public: |
| 769 | typedef typename TBase::TIterator TIterator; |
| 770 | |
| 771 | TLWCache(size_t maxSize, bool multiValue = false) |
| 772 | : TBase(TListType(maxSize), multiValue) |
| 773 | { |
| 774 | } |
| 775 | |
| 776 | TValue& GetLightest() { |
| 777 | return TBase::List.GetLightest()->Value; |
| 778 | } |
| 779 | |
| 780 | TIterator FindLightest() { |
| 781 | return TBase::Empty() ? TBase::End() : this->FindByItem(TBase::List.GetLightest()); |
| 782 | } |
| 783 | }; |
nothing calls this directly
no test coverage detected