Added pool<K>::pop()
authorClifford Wolf <clifford@clifford.at>
Tue, 7 Apr 2015 13:07:01 +0000 (15:07 +0200)
committerClifford Wolf <clifford@clifford.at>
Tue, 7 Apr 2015 13:07:01 +0000 (15:07 +0200)
kernel/hashlib.h

index 94b573e47f47f5a2a1c7f204037759fd08724613..7cea195d58d4dbcbeddf88539557f746f6a1ea3c 100644 (file)
@@ -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);