diff --git a/src/lru.h b/src/lru.h index 97b19de2e..1ed1412bb 100644 --- a/src/lru.h +++ b/src/lru.h @@ -44,8 +44,6 @@ class lru_cache_t { explicit lru_node_t(Contents &&v) : value(std::move(v)) {} }; - typedef typename std::unordered_map::iterator node_iter_t; - // Max node count. This may be (transiently) exceeded by add_node_without_eviction, which is // used from background threads. const size_t max_node_count; @@ -53,7 +51,7 @@ class lru_cache_t { // All of our nodes // Note that our linked list contains pointers to these nodes in the map // We are dependent on the iterator-noninvalidation guarantees of std::map - std::unordered_map node_map; + std::map node_map; // Head of the linked list // The list is circular! @@ -227,7 +225,7 @@ class lru_cache_t { } // Tell the node where it is in the map - node_iter_t iter = iter_inserted.first; + auto iter = iter_inserted.first; lru_node_t *node = &iter->second; node->key = &iter->first;