fix bug in move constructor
This commit is contained in:
@@ -48,7 +48,7 @@ public:
|
||||
PIINTROSPECTION_CONTAINER_NEW(T, sizeof(T))
|
||||
resize(piv_size, f);
|
||||
}
|
||||
inline PIVector(PIVector<T> && other): piv_data(other.piv_data), piv_size(other.piv_size), piv_rsize(other.piv_size) {
|
||||
inline PIVector(PIVector<T> && other): piv_data(other.piv_data), piv_size(other.piv_size), piv_rsize(other.piv_rsize) {
|
||||
other._reset();
|
||||
}
|
||||
inline virtual ~PIVector() {
|
||||
@@ -69,8 +69,7 @@ public:
|
||||
}
|
||||
|
||||
inline PIVector<T> & operator =(PIVector<T> && other) {
|
||||
PIVector<T> moved(std::move(other));
|
||||
swap(moved);
|
||||
swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user