diff --git a/src/qe/qe_arrays.cpp b/src/qe/qe_arrays.cpp index cec3a7726..5d7bdaf14 100644 --- a/src/qe/qe_arrays.cpp +++ b/src/qe/qe_arrays.cpp @@ -967,7 +967,7 @@ namespace qe { else { r.reset(); } - rs.push_back(r); + rs.push_back(std::move(r)); } return rs; } diff --git a/src/util/ref_vector.h b/src/util/ref_vector.h index 40c01b012..fd8ce43d9 100644 --- a/src/util/ref_vector.h +++ b/src/util/ref_vector.h @@ -327,10 +327,7 @@ public: // prevent abuse: ref_vector & operator=(ref_vector const & other) = delete; - ref_vector & operator=(ref_vector && other) { - super::operator=(std::move(other)); - return *this; - } + ref_vector & operator=(ref_vector && other) = default; bool operator==(ref_vector const& other) const { if (other.size() != this->size()) return false; diff --git a/src/util/vector.h b/src/util/vector.h index 588be7ae8..010c8d7ac 100644 --- a/src/util/vector.h +++ b/src/util/vector.h @@ -587,13 +587,7 @@ public: ptr_vector():vector() {} ptr_vector(unsigned s):vector(s) {} ptr_vector(unsigned s, T * elem):vector(s, elem) {} - ptr_vector(ptr_vector const & source):vector(source) {} - ptr_vector(ptr_vector && other) noexcept : vector(std::move(other)) {} ptr_vector(unsigned s, T * const * data):vector(s, const_cast(data)) {} - ptr_vector & operator=(ptr_vector const & source) { - vector::operator=(source); - return *this; - } }; template @@ -602,13 +596,7 @@ public: svector():vector() {} svector(SZ s):vector(s) {} svector(SZ s, T const & elem):vector(s, elem) {} - svector(svector const & source):vector(source) {} - svector(svector && other) noexcept : vector(std::move(other)) {} svector(SZ s, T const * data):vector(s, data) {} - svector & operator=(svector const & source) { - vector::operator=(source); - return *this; - } };