Merge pull request #11722 from ricardoquesada/assert_fixes

compiles on win32
This commit is contained in:
Ricardo Quesada 2015-05-06 09:15:16 -07:00
commit 6212c7d614
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@
#include <new>
#include <exception>
#include "base/ccMacros.h"
#include <assert.h>
USING_NS_CC_ALLOCATOR;
@ -45,7 +45,7 @@ namespace
void* operator new[] (std::size_t size)
{
void* ptr = global.allocate(size);
CCASSERT(ptr, "No memory");
assert(ptr && "No memory");
// dissabling exceptions since cocos2d-x doesn't use them
//#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID
@ -59,7 +59,7 @@ void* operator new[] (std::size_t size)
void* operator new(std::size_t size)
{
void* ptr = global.allocate(size);
CCASSERT(ptr, "No memory");
assert(ptr && "No memory");
// dissabling exceptions since cocos2d-x doesn't use them
//#if CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID