2 Template classes based on NSNumber/NSValue <Download>

Hey guys,

i someone is interested in a template class based on NSNumber with the ability to store ints, floats, unsigned long longs etc and that can be stored in arrays and dicts, here we go:

Just clone it and copy the header in your project.

edit:
I have also added a CCValue class now which can store any arbitrary pod type. I also extended both classes with comparison and factory methods for fast copying.

I know it is nothing big but I missed both of them pretty hard in the cocos2dx library.

Greetings,
Markus

I have also added a CCValue class now which can store any arbitrary pod type. I also extended both classes with comparison and factory methods for fast copying.

I know it is nothing big but I missed both of them pretty hard in the cocos2dx library.

it would be nice if you clarify the license on your github repo :slight_smile:

Ok :slight_smile: What do i have to write? I want to make it public and open source (Free to use of courseā€¦ do what you want ^^) . Is that the same licence as cocos2dx ?

cocos2d-iphone, cocos2d-x and many of the cocos2d-iphone extensions are licensed under the MIT license.
I am not sure what licenses we should/we must choose for cocos2d-x extensions.

Licenses are usually found in README, LICENSE, and/or inside source code comments.
example: https://github.com/jerrodputman/CCKit

Alright friend,

i added the same license as CCKit has.

Have fun :slight_smile:

The compare function is given an error. It says
Invalid arguments
Candidates are:
int memcmp(const void , const void, ?)

What should i do. I am using eclipse and cocos2dx ?