diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-12-28 19:24:24 +0100 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-12-28 19:24:24 +0100 |
commit | 137f35373f4ef0d1ddf212187e537e48d077b1f4 (patch) | |
tree | a77df3913cb442b444f530648b71d4777e0921d2 /kernel/utils.h | |
parent | f3a97b75c78bd6f3670445129405213c0a015481 (diff) | |
download | yosys-137f35373f4ef0d1ddf212187e537e48d077b1f4.tar.gz yosys-137f35373f4ef0d1ddf212187e537e48d077b1f4.tar.bz2 yosys-137f35373f4ef0d1ddf212187e537e48d077b1f4.zip |
Changed more code to dict<> and pool<>
Diffstat (limited to 'kernel/utils.h')
-rw-r--r-- | kernel/utils.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/utils.h b/kernel/utils.h index 479effdc9..2ec6182ea 100644 --- a/kernel/utils.h +++ b/kernel/utils.h @@ -31,17 +31,17 @@ YOSYS_NAMESPACE_BEGIN // A map-like container, but you can save and restore the state // ------------------------------------------------ -template<typename Key, typename T, typename Compare = std::less<Key>> +template<typename Key, typename T, typename OPS = hash_ops<Key>> struct stackmap { private: - std::vector<std::map<Key, T*, Compare>> backup_state; - std::map<Key, T, Compare> current_state; + std::vector<dict<Key, T*, OPS>> backup_state; + dict<Key, T, OPS> current_state; static T empty_tuple; public: stackmap() { } - stackmap(const std::map<Key, T, Compare> &other) : current_state(other) { } + stackmap(const dict<Key, T, OPS> &other) : current_state(other) { } template<typename Other> void operator=(const Other &other) @@ -94,7 +94,7 @@ public: current_state.erase(k); } - const std::map<Key, T, Compare> &stdmap() + const dict<Key, T, OPS> &stdmap() { return current_state; } |