hashtable fixes

master
Daniel Kolesa 2015-08-01 04:11:03 +01:00
parent c66fa7c7bf
commit bc2bd9ca3b
1 changed files with 2 additions and 2 deletions

View File

@ -307,7 +307,7 @@ protected:
Chain *c = find(key, h); Chain *c = find(key, h);
if (c) return B::get_data(c->value); if (c) return B::get_data(c->value);
rehash_ahead(1); rehash_ahead(1);
return insert(h, key); return insert(bucket(key), key);
} }
T &access_or_insert(K &&key) { T &access_or_insert(K &&key) {
@ -315,7 +315,7 @@ protected:
Chain *c = find(key, h); Chain *c = find(key, h);
if (c) return B::get_data(c->value); if (c) return B::get_data(c->value);
rehash_ahead(1); rehash_ahead(1);
return insert(h, move(key)); return insert(bucket(key), move(key));
} }
T *access(const K &key) const { T *access(const K &key) const {