add std::move to Vector move constructor and move equal operator overloading function.

This commit is contained in:
boyu0 2013-12-10 15:58:13 +08:00
parent 55270cecb4
commit 698cdc5591
1 changed files with 2 additions and 2 deletions

View File

@ -68,7 +68,7 @@ public:
Vector<T>(Vector<T>&& other)
{
CCLOGINFO("In the move constructor of Vector!");
_data = other._data;
_data = std::move(other._data);
}
Vector<T>& operator=(const Vector<T>& other)
@ -83,7 +83,7 @@ public:
Vector<T>& operator=(Vector<T>&& other)
{
CCLOGINFO("In the move assignment operator!");
_data = other._data;
_data = std::move(other._data);
return *this;
}