cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

Getters and setters for Long preference values

Open theSlyest opened this issue 5 years ago • 3 comments

I needed to store Long values for my game, so I added the getter and setter methods for each supported platform. In fact, I should have done this earlier, since I made these changes when I was using version 3.17.

theSlyest avatar Sep 10 '20 18:09 theSlyest

Actually, I don't recommend use Long, for cross-platform game engine, use integer type with explicit word size is better, such as int32_t, int64_t

The type long 's word size is different on win32 and non-win32 system

halx99 avatar Sep 13 '20 06:09 halx99

intptr_t also better than long

halx99 avatar Sep 13 '20 06:09 halx99

You are right, so I switched from long to int64_t

theSlyest avatar Oct 02 '20 10:10 theSlyest