From 030e5ec43851569fc0e7991a6672cebdae295b48 Mon Sep 17 00:00:00 2001 From: Robert O'Callahan Date: Tue, 2 Sep 2025 03:01:11 +0000 Subject: [PATCH] Make IdString hashing take a reference to the IdString instead of copying it --- kernel/rtlil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rtlil.h b/kernel/rtlil.h index ea358d83b..c81a0c00a 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -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); } };