Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 766656
Collapse All | Expand All

(-)a/include/o3tl/lru_map.hxx (-3 / +3 lines)
Lines 48-54 Link Here
48
48
49
    list_t mLruList;
49
    list_t mLruList;
50
    map_t mLruMap;
50
    map_t mLruMap;
51
    const size_t mMaxSize;
51
    const std::size_t mMaxSize;
52
52
53
    void checkLRU()
53
    void checkLRU()
54
    {
54
    {
Lines 66-72 Link Here
66
    typedef list_const_iterator_t const_iterator;
66
    typedef list_const_iterator_t const_iterator;
67
67
68
    // a size of 0 effectively disables the LRU cleanup code
68
    // a size of 0 effectively disables the LRU cleanup code
69
    lru_map(size_t nMaxSize)
69
    lru_map(std::size_t nMaxSize)
70
        : mMaxSize(nMaxSize ? nMaxSize : std::min(mLruMap.max_size(), mLruList.max_size()))
70
        : mMaxSize(nMaxSize ? nMaxSize : std::min(mLruMap.max_size(), mLruList.max_size()))
71
    {}
71
    {}
72
    ~lru_map()
72
    ~lru_map()
Lines 165-171 Link Here
165
        return mLruList.cend();
165
        return mLruList.cend();
166
    }
166
    }
167
167
168
    size_t size() const
168
    std::size_t size() const
169
    {
169
    {
170
        assert(mLruMap.size() == mLruList.size());
170
        assert(mLruMap.size() == mLruList.size());
171
        return mLruMap.size();
171
        return mLruMap.size();

Return to bug 766656