Ticket #1063: cache_adt_remove-fix.patch

File cache_adt_remove-fix.patch, 440 bytes (added by Echelon9, 12 years ago)

Proposed fix for adt_cache std::remove_if approach

  • source/lib/adts/cache_adt.h

     
    567567
    568568    void remove(const Key& key)
    569569    {
    570         std::remove_if(lru.begin(), lru.end(), KeyEq(key));
     570        CIt it = std::remove_if(lru.begin(), lru.end(), KeyEq(key));
     571        lru.erase(it, lru.end());
    571572    }
    572573
    573574    void on_access(Entry& entry)