Commit Graph

276 Commits

Author SHA1 Message Date
James Chen d4d864216b issue : Deletes Vector::init, adds Vector::setCapacity. 2013-12-04 16:00:18 +08:00
James Chen 90062b656d issue : Node::_children is Vector<Node*> now. 2013-12-04 16:00:17 +08:00
James Chen c152652c5b issue : Vector<FiniteTimeAction*> for Sequence::create(arr) and Spawn::create(arr). 2013-12-04 15:56:08 +08:00
James Chen 80004548c8 issue : Adds CCVector.h to Xcode project. int —> long 2013-12-04 15:56:08 +08:00
James Chen 52af153a81 issue : Commit CCVector.h from Riq’s repo(https://github.com/ricardoquesada/cocos2d-x/blob/template_vector/cocos2dx/cocoa/CCVector.h). 2013-12-04 15:56:08 +08:00
minggo 608e3bfa1b Merge pull request from signmotion/corrected_DISALLOW_COPY_AND_ASSIGN
[ci skip]Corrected "disallow copy and assign"
2013-12-03 19:21:45 -08:00
minggo 225348cdde use size_t instead of long in Array 2013-12-03 11:09:39 +08:00
martell f369606d77 fix cocos2d-x for vs2013 2013-11-30 08:05:39 +00:00
signmotion 03d64e0689 - Corrected CC_DISALLOW_COPY_AND_ASSIGN. 2013-11-29 20:34:15 +02:00
Ricardo Quesada 9b52af010d Macro CC_DISABLE_COPY is renamed to CC_DISALLOW_COPY_AND_ASSIGN
and the old CC_DISALLOW_COPY_AND_ASSIGN is removed
2013-11-22 16:09:05 -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
boyu0 6c1144ee79 issue : fix some warning 2013-11-11 12:49:38 +08:00
Dhilan007 314f2ac62e use float instead for create point object 2013-11-08 14:13:39 +08:00
minggo d1f94e0d9d Merge pull request from boyu0/iss2771_physical
[ci skip]issue : physical
2013-11-07 18:51:15 -08:00
minggo 167242e540 Merge pull request from Dhilan007/ANCHOR_XXX
[ci skip]Point: Adds ANCHOR_XXX constants like ANCHOR_MIDDLE, ANCHOR_TOP_RIGHT, e...
2013-11-07 18:45:50 -08:00
Dhilan007 916361af3f Point: Adds ANCHOR_XXX constants like ANCHOR_MIDDLE, ANCHOR_TOP_RIGHT, etc. 2013-11-07 23:40:33 +08:00
boyu0 7363be0697 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-11-07 17:37:33 +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
boyu0 af129e25f0 issue : change some coding style 2013-11-05 20:02:58 +08:00
Ricardo Quesada ba7ed6e578 Fixes some compiler warnings
The warnings are related to:

* 64-to-32-bit conversion
* shadow variables
2013-11-04 16:31:36 -08:00
James Chen 9be8ca3714 [cmake] output lib to root/lib 2013-11-04 21:03:08 +08:00
James Chen 8676523433 Adding CMakeLists.txt 2013-11-04 21:03:07 +08:00
boyu0 b2951b70ff issue : enhance Listener use EventListener mechanism 2013-11-01 14:50:06 +08:00
boyu0 d12ee5f120 Merge branch 'develop' of https://github.com/cocos2d/cocos2d-x into iss2771_physical 2013-10-18 15:34:13 +08:00
minggo 95acb1b9e3 issue : helloworld build ok on android 2013-10-14 14:01:00 +08:00
minggo 8eeb911e8f issue : adjust folder structure 2013-10-12 15:25:45 +08:00