Merge pull request #4697 from seobyeongky/CCData_bugfix

CCData bugfix
This commit is contained in:
James Chen 2013-12-26 23:57:34 -08:00
commit ff3c7ca06d
1 changed files with 6 additions and 2 deletions

View File

@ -39,13 +39,17 @@ _size(0)
CCLOGINFO("In the empty constructor of Data.");
}
Data::Data(Data&& other)
Data::Data(Data&& other) :
_bytes(nullptr),
_size(0)
{
CCLOGINFO("In the move constructor of Data.");
move(other);
}
Data::Data(const Data& other)
Data::Data(const Data& other) :
_bytes(nullptr),
_size(0)
{
CCLOGINFO("In the copy constructor of Data.");
copy(other._bytes, other._size);