Yes, of course we should switch it which is why I added that macro.

However CCAssert is defined globally not per platform. And it is defined to
use CC_ASSERT(cond)

When other platforms have been fixed we can easily switch to the correct
definition.

On Jan 9, 2013, at 19:21, James Chen <notifications@github.com> wrote:

In cocos2dx/platform/android/CCPlatformDefine.h:

> +    if (!(cond)) {                                              \
> +        __android_log_print(ANDROID_LOG_ERROR,                  \
> +                            "cocos2d-x assert",                 \
> +                            "%s function:%s line:%d",           \
> +                            __FILE__, __FUNCTION__, __LINE__);  \
> +    }
> +
> +#define CC_MESSAGE_PSEUDOASSERT(cond, msg)                          \
> +    if (!(cond)) {                                                  \
> +        __android_log_print(ANDROID_LOG_ERROR,                      \
> +                            "cocos2d-x assert",                     \
> +                            "file:%s function:%s line:%d, %s",      \
> +                            __FILE__, __FUNCTION__, __LINE__, msg); \
> +    }
> +
> +#define CC_ASSERT(cond) CC_NO_MESSAGE_PSEUDOASSERT(cond)

Do you think we should use the msg param of CCAssert?
Now, the msg param isn't used.
So maybe

#define CCAssert(cond, msg) CC_ASSERT_MSG(cond, msg)

is more suitable.
And on android, we define CC_ASSERT_MSG to CC_MESSAGE_PSEUDOASSERT.

—
Reply to this email directly or view it on
GitHub<https://github.com/cocos2d/cocos2d-x/pull/1827/files#r2600743>.