From 698cdc55918d35b64c783f0c05c6cac3d3397f77 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Tue, 10 Dec 2013 15:58:13 +0800 Subject: [PATCH] add std::move to Vector move constructor and move equal operator overloading function. --- cocos/base/CCVector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/base/CCVector.h b/cocos/base/CCVector.h index 3ea40ccc8a..292d70f47b 100644 --- a/cocos/base/CCVector.h +++ b/cocos/base/CCVector.h @@ -68,7 +68,7 @@ public: Vector(Vector&& other) { CCLOGINFO("In the move constructor of Vector!"); - _data = other._data; + _data = std::move(other._data); } Vector& operator=(const Vector& other) @@ -83,7 +83,7 @@ public: Vector& operator=(Vector&& other) { CCLOGINFO("In the move assignment operator!"); - _data = other._data; + _data = std::move(other._data); return *this; }