3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-11 12:11:27 +00:00

Make IdString hashing take a reference to the IdString instead of copying it

This commit is contained in:
Robert O'Callahan 2025-09-02 03:01:11 +00:00 committed by Jannis Harder
parent 05d32149b7
commit 95c31817dd

View file

@ -430,10 +430,10 @@ namespace hashlib {
static inline bool cmp(const RTLIL::IdString &a, const RTLIL::IdString &b) {
return a == b;
}
[[nodiscard]] static inline Hasher hash(const RTLIL::IdString id) {
[[nodiscard]] static inline Hasher hash(const RTLIL::IdString &id) {
return id.hash_top();
}
[[nodiscard]] static inline Hasher hash_into(const RTLIL::IdString id, Hasher h) {
[[nodiscard]] static inline Hasher hash_into(const RTLIL::IdString &id, Hasher h) {
return id.hash_into(h);
}
};