3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-09-10 03:31:26 +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 Emil J. Tywoniak
parent ddf7ba5a34
commit 030e5ec438

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);
}
};