From 4dbef95792c13f68000857a347935dc0388f94d6 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Tue, 14 Jan 2025 12:48:59 +0100 Subject: [PATCH] mark all hash_top methods nodiscard --- kernel/rtlil.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kernel/rtlil.h b/kernel/rtlil.h index ce66c5af5..3d8187e78 100644 --- a/kernel/rtlil.h +++ b/kernel/rtlil.h @@ -364,7 +364,7 @@ struct RTLIL::IdString [[nodiscard]] Hasher hash_into(Hasher h) const { return hash_ops::hash_into(index_, h); } - Hasher hash_top() const { + [[nodiscard]] Hasher hash_top() const { Hasher h; h.force((Hasher::hash_t) index_); return h; @@ -915,7 +915,7 @@ struct RTLIL::SigBit bool operator ==(const RTLIL::SigBit &other) const; bool operator !=(const RTLIL::SigBit &other) const; [[nodiscard]] Hasher hash_into(Hasher h) const; - Hasher hash_top() const; + [[nodiscard]] Hasher hash_top() const; }; namespace hashlib {