Commit Graph

16 Commits

Author SHA1 Message Date
walzer 64af0de648 update copyrights for 2014, in cocos/2d/ folder 2014-01-07 11:25:07 +08:00
James Chen 9e05f300f3 [Data Refactor] compilation error fix. 2013-12-20 21:16:46 +08:00
James Chen 21a9f05110 Merge branch 'develop' of git://github.com/cocos2d/cocos2d-x into data-refactor
Conflicts:
	cocos/2d/CCUserDefault.cpp
	cocos/2d/CCUserDefault.mm
	cocos/2d/CCUserDefaultAndroid.cpp
	cocos/2d/ZipUtils.cpp
	cocos/2d/platform/CCFileUtils.h
	cocos/2d/platform/CCSAXParser.cpp
2013-12-20 21:12:11 +08:00
James Chen 2c590cea3e closed #3457: Fix of UserDefault. Infinite loop in UserDefault's destructor on iOS. The destructor of UserDefault is private now. 2013-12-20 14:06:24 +08:00
boyu0 e07c4ffec1 Change NULL to nullptr, edit hungarian notation. 2013-12-18 17:47:20 +08:00
James Chen 2892e8be3f Refactors Data class, adds FileUtils::getStringFromFile, FileUtils::getDataFromFile and deprecates FileUtils::getFileData. 2013-12-18 14:58:17 +08:00
minggo fa7c97171b fix some warnings 2013-12-06 16:32:06 +08:00
minggo b67d567a79 replace long with int or ssize_t 2013-12-05 17:22:22 +08:00
Huabing.Xu bc55d3246b Merge branch 'develop' into free_instead_of_delete
# By minggo (12) and others
# Via minggo (18) and others
* develop: (78 commits)
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Update CHANGELOG[ci skip]
  Update AUTHORS [ci skip]
  fix bug: cccolor to jsval function has error in jsb
  [ci skip]
  [ci skip]
  [ci skip]
  [ci skip]
  [ci skip]
  C++11: NULL -> nullptr
  [ci skip]
  Fix: UserDefault::createXMLFile with correct XML definition.
  [ci skip]
  [ci skip]
  [ci skip]
  Fix bug: rename const with under line seperator
  [AUTO] : updating submodule reference to latest autogenerated bindings
  Fix bug: Z fighting on TransitionScenePageTurn
  Fixed bugs
  Modify reader and fixed bugs
  ...

Conflicts:
	cocos/editor-support/cocostudio/CCSGUIReader.cpp
2013-11-14 14:47:01 +08:00
Jason Xu f4425f5db2 C++11: NULL -> nullptr 2013-11-14 11:08:50 +08:00
Jason Xu dee3bffcdc Fix: UserDefault::createXMLFile with correct XML definition. 2013-11-14 10:40:06 +08:00
Ricardo Quesada be64dd97cf replaces `delete[]` with `free()` in C-based API
API that returns a newly allocated buffer as an output argument (not return value) are error-prone.

- Users forget to release the newly allocated buffer
- Or the call `delete` instead of `delete[]`

But some of those API need to call `realloc` on the buffer.
But `realloc` is only valid if the buffer was previously allocated with `malloc`.
If a buffer needs to be re-allocated using a C++ API, then `std::vector<char*>` should be used instead...

So, this patch does:

- Migrates the API from  `new []` / `delete[]` to  `malloc()` / `free()`
- Fixes all the memory issues: incorrect deallocs and memory leaks
- Updates the documentation
- And fixes misc issues with the API: removes `cc` from the ZipUtils class.
2013-11-11 18:09:47 -08:00
Ricardo Quesada 84a6aa29cd Adds more 64-bit fixes
Replaces more `int` with `long` where it makes sense.

Also , it repalces some `unsigned long` with `long` for "lenght"
values as described in our c++ guideline
2013-11-05 17:36:44 -08:00
psi 5443fc0d07 pXmlBuffer is not null terminated 2013-11-03 11:17:04 +09:00
minggo 95acb1b9e3 issue #2905: helloworld build ok on android 2013-10-14 14:01:00 +08:00
minggo 49d7bbd600 issue #2905: remove sub folders except platform 2013-10-12 15:41:45 +08:00