3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-10 13:10:51 +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

@ -47,7 +47,7 @@ struct DftTagWorker {
bool operator<(const tag_set &other) const { return index < other.index; }
bool operator==(const tag_set &other) const { return index == other.index; }
Hasher hash_into(Hasher h) const { h.eat(index); return h; }
[[nodiscard]] Hasher hash_into(Hasher h) const { h.eat(index); return h; }
bool empty() const { return index == 0; }
};

View file

@ -52,7 +52,7 @@ struct ExampleDtPass : public Pass
return name == other.name && parameters == other.parameters;
}
Hasher hash_into(Hasher h) const {
[[nodiscard]] Hasher hash_into(Hasher h) const {
h.eat(name);
h.eat(parameters);
return h;