mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-06 14:13:23 +00:00
mark all hash_into methods nodiscard
This commit is contained in:
parent
a2805b15c9
commit
a58481e9b7
21 changed files with 60 additions and 60 deletions
|
@ -151,7 +151,7 @@ namespace Functional {
|
|||
// returns the data width of a bitvector sort, errors out for other sorts
|
||||
int data_width() const { return std::get<1>(_v).second; }
|
||||
bool operator==(Sort const& other) const { return _v == other._v; }
|
||||
Hasher hash_into(Hasher h) const { h.eat(_v); return h; }
|
||||
[[nodiscard]] Hasher hash_into(Hasher h) const { h.eat(_v); return h; }
|
||||
};
|
||||
class IR;
|
||||
class Factory;
|
||||
|
@ -225,7 +225,7 @@ namespace Functional {
|
|||
const RTLIL::Const &as_const() const { return std::get<RTLIL::Const>(_extra); }
|
||||
std::pair<IdString, IdString> as_idstring_pair() const { return std::get<std::pair<IdString, IdString>>(_extra); }
|
||||
int as_int() const { return std::get<int>(_extra); }
|
||||
Hasher hash_into(Hasher h) const {
|
||||
[[nodiscard]] Hasher hash_into(Hasher h) const {
|
||||
h.eat((unsigned int) _fn);
|
||||
h.eat(_extra);
|
||||
return h;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue