3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-29 15:37:59 +00:00

mark all hash_into methods nodiscard

This commit is contained in:
Emil J. Tywoniak 2025-01-14 12:39:15 +01:00
parent a2805b15c9
commit a58481e9b7
21 changed files with 60 additions and 60 deletions

View file

@ -169,7 +169,7 @@ public:
return !(*this == other);
}
Hasher hash_into(Hasher h) const
[[nodiscard]] Hasher hash_into(Hasher h) const
{
h.eat(scope_name);
h.eat(target);
@ -325,7 +325,7 @@ struct ModuleItem {
Cell *cell() const { return type == Type::Cell ? static_cast<Cell *>(ptr) : nullptr; }
bool operator==(const ModuleItem &other) const { return ptr == other.ptr && type == other.type; }
Hasher hash_into(Hasher h) const { h.eat(ptr); return h; }
[[nodiscard]] Hasher hash_into(Hasher h) const { h.eat(ptr); return h; }
};
static inline void log_dump_val_worker(typename IdTree<ModuleItem>::Cursor cursor ) { log("%p %s", cursor.target, log_id(cursor.scope_name)); }