diff options
author | gatecat <gatecat@ds0.me> | 2021-06-02 11:36:56 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2021-06-02 15:05:20 +0100 |
commit | eca1a4cee4f310c7e2c1216bd678143c1967edd4 (patch) | |
tree | 2106f7895e22f60f6d200cca6d9244bcc81a1ab9 /gui | |
parent | b8a68f5f35af49c36d6f4e86a3a1c5afa1b3215f (diff) | |
download | nextpnr-eca1a4cee4f310c7e2c1216bd678143c1967edd4.tar.gz nextpnr-eca1a4cee4f310c7e2c1216bd678143c1967edd4.tar.bz2 nextpnr-eca1a4cee4f310c7e2c1216bd678143c1967edd4.zip |
Use hashlib in most remaining code
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'gui')
-rw-r--r-- | gui/treemodel.cc | 2 | ||||
-rw-r--r-- | gui/treemodel.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/gui/treemodel.cc b/gui/treemodel.cc index cc563202..b0dc51db 100644 --- a/gui/treemodel.cc +++ b/gui/treemodel.cc @@ -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); diff --git a/gui/treemodel.h b/gui/treemodel.h index e9c42a0f..e2692f3e 100644 --- a/gui/treemodel.h +++ b/gui/treemodel.h @@ -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_; |