diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2012-12-11 13:18:40 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2012-12-11 13:18:40 -0800 |
commit | d43c803bfe1edfe828141e801190f39e072aa3d2 (patch) | |
tree | 9ead82c01d0398704067a75b6a805831991411fb /lru.h | |
parent | eec6db0a2312e923f74402bb2e714f4bb331d9bd (diff) |
Fix for build errors with g++ 4.0.1
Diffstat (limited to 'lru.h')
-rw-r--r-- | lru.h | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -97,6 +97,11 @@ private: evict_node((node_type_t *)mouth.prev); } + static lru_node_t *get_previous(lru_node_t *node) + { + return node->prev; + } + protected: /** Head of the linked list */ @@ -218,11 +223,11 @@ public: iterator(lru_node_t *val) : node(val) { } void operator++() { - node = node->prev; + node = lru_cache_t::get_previous(node); } void operator++(int x) { - node = node->prev; + node = lru_cache_t::get_previous(node); } bool operator==(const iterator &other) { |