Using std::move() in SigSpec move constructor

This commit is contained in:
Clifford Wolf 2014-07-27 09:20:59 +02:00
parent 7f3dc86ecd
commit ddc5b41848

View file

@ -628,15 +628,15 @@ public:
SigSpec(RTLIL::SigSpec &&other) {
width_ = other.width_;
hash_ = other.hash_;
chunks_.swap(other.chunks_);
bits_.swap(other.bits_);
chunks_ = std::move(other.chunks_);
bits_ = std::move(other.bits_);
}
const RTLIL::SigSpec &operator=(RTLIL::SigSpec &&other) {
width_ = other.width_;
hash_ = other.hash_;
chunks_.swap(other.chunks_);
bits_.swap(other.bits_);
chunks_ = std::move(other.chunks_);
bits_ = std::move(other.bits_);
return *this;
}