Merge branch 'develop' into develop_nutty_modify_framework_addnewreader

This commit is contained in:
CaiWenzhi 2013-12-27 16:02:38 +08:00
commit 26fd64c61a
2 changed files with 7 additions and 2 deletions

View File

@ -677,6 +677,7 @@ Developers:
seobyeongky seobyeongky
Updates spine runtime. Updates spine runtime.
Fixed a potential bug in Data's copy constructor.
luocker luocker
Fix a bug that string itself is also modified in `String::componentsSeparatedByString`. Fix a bug that string itself is also modified in `String::componentsSeparatedByString`.

View File

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