aboutsummaryrefslogtreecommitdiffstats
path: root/staging_vespalib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-12-21 23:15:38 +0100
committerHenning Baldersheim <balder@yahoo-inc.com>2017-12-28 19:13:17 +0100
commit5e7bce870190540010018932137d643538c8de44 (patch)
tree00eeab7afadec9103edd644a5fd5f8de70bcc781 /staging_vespalib
parent6afc44c61d16fbd2e89b1d28c7f50c4f00fdcd0f (diff)
Use a faster and simpler iteration for speed and simplicity.
Diffstat (limited to 'staging_vespalib')
-rw-r--r--staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp b/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp
index fe57de093dd..dfa21e12137 100644
--- a/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp
+++ b/staging_vespalib/src/vespa/vespalib/stllike/lrucache_map.hpp
@@ -122,7 +122,7 @@ lrucache_map<P>::erase(const K & key) {
} else {
_tail = v._prev;
}
- HashTable::erase(*this, it);
+ HashTable::erase(*this, HashTable::hash(key), it);
}
}
@@ -202,7 +202,7 @@ lrucache_map<P>::removeOld() {
{
_tail = last->second._prev;
HashTable::getByInternalIndex(_tail).second._next = LinkedValueBase::npos;
- HashTable::erase(*this, HashTable::find(last->first));
+ HashTable::erase(*this, HashTable::hash(last->first), HashTable::find(last->first));
}
}
}