diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-26 15:57:27 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-26 15:58:22 +0200 |
commit | cd6574ecf652901573cbc6b89e1a59dd383ec496 (patch) | |
tree | c855477b523f67df1fc1d4b9fabbfa848cbcff42 /kernel/rtlil.cc | |
parent | 7ac9dc7f6eab40b3853583848933c4a8a94df9c9 (diff) | |
download | yosys-cd6574ecf652901573cbc6b89e1a59dd383ec496.tar.gz yosys-cd6574ecf652901573cbc6b89e1a59dd383ec496.tar.bz2 yosys-cd6574ecf652901573cbc6b89e1a59dd383ec496.zip |
Added some missing "const" in rtlil.h
Diffstat (limited to 'kernel/rtlil.cc')
-rw-r--r-- | kernel/rtlil.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/rtlil.cc b/kernel/rtlil.cc index 1638682c1..73f5d71f9 100644 --- a/kernel/rtlil.cc +++ b/kernel/rtlil.cc @@ -883,7 +883,7 @@ void RTLIL::Module::connect(const RTLIL::SigSpec &lhs, const RTLIL::SigSpec &rhs connections_.push_back(RTLIL::SigSig(lhs, rhs)); } -const std::vector<RTLIL::SigSig> &RTLIL::Module::connections() +const std::vector<RTLIL::SigSig> &RTLIL::Module::connections() const { return connections_; } @@ -1350,12 +1350,12 @@ void RTLIL::Cell::set(RTLIL::IdString portname, RTLIL::SigSpec signal) connections_[portname] = signal; } -RTLIL::SigSpec RTLIL::Cell::get(RTLIL::IdString portname) const +const RTLIL::SigSpec &RTLIL::Cell::get(RTLIL::IdString portname) const { return connections_.at(portname); } -const std::map<RTLIL::IdString, RTLIL::SigSpec> &RTLIL::Cell::connections() +const std::map<RTLIL::IdString, RTLIL::SigSpec> &RTLIL::Cell::connections() const { return connections_; } @@ -1839,7 +1839,7 @@ void RTLIL::SigSpec::remove2(const RTLIL::SigSpec &pattern, RTLIL::SigSpec *othe check(); } -RTLIL::SigSpec RTLIL::SigSpec::extract(RTLIL::SigSpec pattern, RTLIL::SigSpec *other) const +RTLIL::SigSpec RTLIL::SigSpec::extract(RTLIL::SigSpec pattern, const RTLIL::SigSpec *other) const { if (other) cover("kernel.rtlil.sigspec.extract_other"); @@ -1859,7 +1859,7 @@ RTLIL::SigSpec RTLIL::SigSpec::extract(RTLIL::SigSpec pattern, RTLIL::SigSpec *o RTLIL::SigSpec ret; if (other) { - std::vector<RTLIL::SigBit> bits_other = other ? other->to_sigbit_vector() : bits_match; + std::vector<RTLIL::SigBit> bits_other = other->to_sigbit_vector(); for (int i = 0; i < width_; i++) if (bits_match[i].wire && pat.count(bits_match[i])) ret.append_bit(bits_other[i]); |