diff options
author | Clifford Wolf <clifford@clifford.at> | 2015-04-07 15:07:01 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2015-04-07 15:07:01 +0200 |
commit | b31e77fd06af44336d572919c45a0089e6ac9c82 (patch) | |
tree | e031f991a5b7f97add82a2c3c033dd195e655dee /kernel | |
parent | c1af590f4e19852f958f76ab6afd8382957f80c1 (diff) | |
download | yosys-b31e77fd06af44336d572919c45a0089e6ac9c82.tar.gz yosys-b31e77fd06af44336d572919c45a0089e6ac9c82.tar.bz2 yosys-b31e77fd06af44336d572919c45a0089e6ac9c82.zip |
Added pool<K>::pop()
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/hashlib.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/hashlib.h b/kernel/hashlib.h index 94b573e47..7cea195d5 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); |