1
0
mirror of https://github.com/YosysHQ/nextpnr.git synced 2026-05-05 07:33:27 +00:00

Use hashlib in most remaining code

Signed-off-by: gatecat <gatecat@ds0.me>
This commit is contained in:
gatecat
2021-06-02 11:36:56 +01:00
parent b8a68f5f35
commit eca1a4cee4
20 changed files with 53 additions and 58 deletions

View File

@@ -58,7 +58,7 @@ void IdList::updateElements(Context *ctx, std::vector<IdStringList> elements)
bool changed = false;
// For any elements that are not yet in managed_, created them.
std::unordered_set<IdStringList> element_set;
pool<IdStringList> element_set;
for (auto elem : elements) {
element_set.insert(elem);
auto existing = managed_.find(elem);

View File

@@ -140,7 +140,7 @@ class IdList : public Item
private:
// Children that we manage the memory for, stored for quick lookup from
// IdString to child.
std::unordered_map<IdStringList, std::unique_ptr<IdStringItem>> managed_;
dict<IdStringList, std::unique_ptr<IdStringItem>> managed_;
// Type of children that the list creates.
ElementType child_type_;
@@ -184,7 +184,7 @@ template <typename ElementT> class ElementList : public Item
ElementGetter getter_;
// Children that we manage the memory for, stored for quick lookup from
// IdString to child.
std::unordered_map<IdStringList, std::unique_ptr<Item>> managed_;
dict<IdStringList, std::unique_ptr<Item>> managed_;
// Type of children that he list creates.
ElementType child_type_;