From bc2bd9ca3b80910e2653f9dcc6e1e0bd8ecc5886 Mon Sep 17 00:00:00 2001 From: q66 Date: Sat, 1 Aug 2015 04:11:03 +0100 Subject: [PATCH] hashtable fixes --- ostd/internal/hashtable.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ostd/internal/hashtable.hh b/ostd/internal/hashtable.hh index e45156d..f0ed8b1 100644 --- a/ostd/internal/hashtable.hh +++ b/ostd/internal/hashtable.hh @@ -307,7 +307,7 @@ protected: Chain *c = find(key, h); if (c) return B::get_data(c->value); rehash_ahead(1); - return insert(h, key); + return insert(bucket(key), key); } T &access_or_insert(K &&key) { @@ -315,7 +315,7 @@ protected: Chain *c = find(key, h); if (c) return B::get_data(c->value); rehash_ahead(1); - return insert(h, move(key)); + return insert(bucket(key), move(key)); } T *access(const K &key) const {