Using std::move() in SigSpec move constructor
authorClifford Wolf <clifford@clifford.at>
Sun, 27 Jul 2014 07:20:59 +0000 (09:20 +0200)
committerClifford Wolf <clifford@clifford.at>
Sun, 27 Jul 2014 07:20:59 +0000 (09:20 +0200)
kernel/rtlil.h

index 97d01617ab39d728374cf25a7ab003126981b446..91c9a1baa01391eca1d51195bfd6a583e2632772 100644 (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;
        }