I see a macro CCARRAY_FOREACH in coccos2d, actually what does it? can we do alternative solution instead of it?i am using following code for spriteBatchNode?
CCARRAY_FOREACH([spriteBatch children], sprite)
{
...................
}
The other answer is actually wrong. CCARRAY_FOREACH
isn't a macro for fast enumeration, it is a replacement for fast enumeration for CCArray
s. CCARRAY_FOREACH
is a tiny bit faster than fast enumeration on a NS(Mutable)Array
(about 10%), so better use it if you are using CCArray
s.
Check the CCArray.h
header to see what the macro actually is.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With