diff options
author | gatecat <gatecat@ds0.me> | 2021-06-01 16:51:18 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-06-02 14:27:56 +0100 |
commit | 579b98c5963c2b86d191d481a2147a663a8196dd (patch) | |
tree | a37baaeac305fbb9d3f7db98ccda8a1708ac234c /common/util.h | |
parent | ff72454f8391ab4785fa8314f3efbbea96c30422 (diff) | |
download | nextpnr-579b98c5963c2b86d191d481a2147a663a8196dd.tar.gz nextpnr-579b98c5963c2b86d191d481a2147a663a8196dd.tar.bz2 nextpnr-579b98c5963c2b86d191d481a2147a663a8196dd.zip |
Use hashlib for core netlist structures
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'common/util.h')
-rw-r--r-- | common/util.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/util.h b/common/util.h index 540646c7..b3e8cbf0 100644 --- a/common/util.h +++ b/common/util.h @@ -55,7 +55,7 @@ std::string str_or_default(const Container &ct, const KeyType &key, std::string }; template <typename KeyType> -std::string str_or_default(const std::unordered_map<KeyType, Property> &ct, const KeyType &key, std::string def = "") +std::string str_or_default(const dict<KeyType, Property> &ct, const KeyType &key, std::string def = "") { auto found = ct.find(key); if (found == ct.end()) @@ -78,8 +78,7 @@ template <typename Container, typename KeyType> int int_or_default(const Contain return std::stoi(found->second); }; -template <typename KeyType> -int int_or_default(const std::unordered_map<KeyType, Property> &ct, const KeyType &key, int def = 0) +template <typename KeyType> int int_or_default(const dict<KeyType, Property> &ct, const KeyType &key, int def = 0) { auto found = ct.find(key); if (found == ct.end()) |