summaryrefslogtreecommitdiff
path: root/kernel/hashlib.h
diff options
context:
space:
mode:
authorClifford Wolf <clifford@clifford.at>2015-04-07 15:07:01 +0200
committerClifford Wolf <clifford@clifford.at>2015-04-07 15:07:01 +0200
commitb31e77fd06af44336d572919c45a0089e6ac9c82 (patch)
treee031f991a5b7f97add82a2c3c033dd195e655dee /kernel/hashlib.h
parentc1af590f4e19852f958f76ab6afd8382957f80c1 (diff)
Added pool<K>::pop()
Diffstat (limited to 'kernel/hashlib.h')
-rw-r--r--kernel/hashlib.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/hashlib.h b/kernel/hashlib.h
index 94b573e4..7cea195d 100644
--- a/kernel/hashlib.h
+++ b/kernel/hashlib.h
@@ -803,6 +803,14 @@ public:
do_rehash();
}
+ K pop()
+ {
+ iterator it = begin();
+ K ret = *it;
+ erase(it);
+ return ret;
+ }
+
void swap(pool &other)
{
hashtable.swap(other.hashtable);