mirror of https://github.com/axmolengine/axmol.git
fix a warning in CCRenderTexture.
This commit is contained in:
parent
be914811fb
commit
d7ebd681ec
|
@ -48,25 +48,25 @@ __arr__++)
|
|||
|
||||
I found that it's not work in C++. So it keep what it's look like in version 1.0.0-rc3. ---By Bin
|
||||
*/
|
||||
#define CCARRAY_FOREACH(__array__, __object__) \
|
||||
if ((__array__) && (__array__)->data->num > 0) \
|
||||
for(CCObject** arr = (__array__)->data->arr, **end = (__array__)->data->arr + (__array__)->data->num-1; \
|
||||
arr <= end && (((__object__) = *arr) != NULL/* || true*/); \
|
||||
arr++)
|
||||
#define CCARRAY_FOREACH(__array__, __object__) \
|
||||
if ((__array__) && (__array__)->data->num > 0) \
|
||||
for(CCObject** __arr__ = (__array__)->data->arr, **__end__ = (__array__)->data->arr + (__array__)->data->num-1; \
|
||||
__arr__ <= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \
|
||||
__arr__++)
|
||||
|
||||
#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \
|
||||
if ((__array__) && (__array__)->data->num > 0) \
|
||||
for(CCObject** arr = (__array__)->data->arr + (__array__)->data->num-1, **end = (__array__)->data->arr; \
|
||||
arr >= end && (((__object__) = *arr) != NULL/* || true*/); \
|
||||
arr--)
|
||||
#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \
|
||||
if ((__array__) && (__array__)->data->num > 0) \
|
||||
for(CCObject** __arr__ = (__array__)->data->arr + (__array__)->data->num-1, **__end__ = (__array__)->data->arr; \
|
||||
__arr__ >= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \
|
||||
__arr__--)
|
||||
|
||||
#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0)
|
||||
#define CCARRAY_VERIFY_TYPE(__array__, __type__) \
|
||||
do { \
|
||||
if ((__array__) && (__array__)->data->num > 0) \
|
||||
for(CCObject** arr = (__array__)->data->arr, \
|
||||
**end = (__array__)->data->arr + (__array__)->data->num-1; arr <= end; arr++) \
|
||||
CCAssert(dynamic_cast<__type__>(*arr), "element type is wrong!"); \
|
||||
#define CCARRAY_VERIFY_TYPE(__array__, __type__) \
|
||||
do { \
|
||||
if ((__array__) && (__array__)->data->num > 0) \
|
||||
for(CCObject** __arr__ = (__array__)->data->arr, \
|
||||
**__end__ = (__array__)->data->arr + (__array__)->data->num-1; __arr__ <= __end__; __arr__++) \
|
||||
CCAssert(dynamic_cast<__type__>(*__arr__), "element type is wrong!"); \
|
||||
} while(false)
|
||||
#else
|
||||
#define CCARRAY_VERIFY_TYPE(__array__, __type__) void(0)
|
||||
|
|
Loading…
Reference in New Issue