mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-07 01:54:10 +00:00
Using std::move() in SigSpec move constructor
This commit is contained in:
parent
7f3dc86ecd
commit
ddc5b41848
|
@ -628,15 +628,15 @@ public:
|
||||||
SigSpec(RTLIL::SigSpec &&other) {
|
SigSpec(RTLIL::SigSpec &&other) {
|
||||||
width_ = other.width_;
|
width_ = other.width_;
|
||||||
hash_ = other.hash_;
|
hash_ = other.hash_;
|
||||||
chunks_.swap(other.chunks_);
|
chunks_ = std::move(other.chunks_);
|
||||||
bits_.swap(other.bits_);
|
bits_ = std::move(other.bits_);
|
||||||
}
|
}
|
||||||
|
|
||||||
const RTLIL::SigSpec &operator=(RTLIL::SigSpec &&other) {
|
const RTLIL::SigSpec &operator=(RTLIL::SigSpec &&other) {
|
||||||
width_ = other.width_;
|
width_ = other.width_;
|
||||||
hash_ = other.hash_;
|
hash_ = other.hash_;
|
||||||
chunks_.swap(other.chunks_);
|
chunks_ = std::move(other.chunks_);
|
||||||
bits_.swap(other.bits_);
|
bits_ = std::move(other.bits_);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue