aboutsummaryrefslogtreecommitdiffhomepage
path: root/lru.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-11 13:18:40 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-12-11 13:18:40 -0800
commitd43c803bfe1edfe828141e801190f39e072aa3d2 (patch)
tree9ead82c01d0398704067a75b6a805831991411fb /lru.h
parenteec6db0a2312e923f74402bb2e714f4bb331d9bd (diff)
Fix for build errors with g++ 4.0.1
Diffstat (limited to 'lru.h')
-rw-r--r--lru.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/lru.h b/lru.h
index 56ea28c4..85280b1f 100644
--- a/lru.h
+++ b/lru.h
@@ -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)
{