Skip to content

Commit 725a1c3

Browse files
authored
Merge pull request #5488 from rocallahan/sigspec-at
Implement at() methods on SigSpec so that SigSpec::bits().at() continues to work as it did
2 parents 677bf21 + 261a0ae commit 725a1c3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kernel/rtlil.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,6 +1726,8 @@ struct RTLIL::SigSpec
17261726
operator std::vector<RTLIL::SigChunk>() const;
17271727
operator std::vector<RTLIL::SigBit>() const { return to_sigbit_vector(); }
17281728
const RTLIL::SigBit &at(int offset, const RTLIL::SigBit &defval) { return offset < size() ? (*this)[offset] : defval; }
1729+
RTLIL::SigBit& at(int offset) { return (*this)[offset]; }
1730+
RTLIL::SigBit at(int offset) const { return (*this)[offset]; }
17291731

17301732
[[nodiscard]] Hasher hash_into(Hasher h) const {
17311733
Hasher::hash_t val;

0 commit comments

Comments
 (0)