Commit fdf85908 authored by JINMEI Tatuya's avatar JINMEI Tatuya

use std::list::splice instead of erase + push_front. (trac #290).


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@2514 e5f2f494-b856-4b98-b285-d166d9295462
parent 4ff6f8e0
......@@ -240,8 +240,7 @@ HotCacheImpl::promote(CacheNodePtr node) {
if (node->lru_entry_ == lru_.begin()) {
return;
}
lru_.erase(node->lru_entry_);
lru_.push_front(node);
lru_.splice(lru_.begin(), lru_, node->lru_entry_); // move node to front
node->lru_entry_ = lru_.begin();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment