CCArray isEqual

I noticed that the current implementation of CCArray in cocos2d-x matches that of an old version of cocos2d-iphone rather than the current version.

The only difference I am aware of is that cocos2d-x’s ccArrayGetIndexOfObject compares the pointers to ascertain whether two objects are equal whereas cocos2d-iphone uses CCObject::isEqual(const CCObject* pObject).

Will it cause any problems if I modify CCArray to match the latter behaviour? Especially given that the default CCObject behaviour is to compare the pointers and the only class to override this is CCString.

This is causing me issues too, but since the function ccArrayGetIndexOfObject() in ccCArray is the base function for so many other functions, I opted to make my own function:

unsigned int getIndexOfEquivalentObject(CCArray* arr, CCObject* object)
{
    int cnt = arr->count();
    for(unsigned int i = 0; i < cnt; i++)
    {
        CCObject* obj2 = arr->objectAtIndex(i);
        if (obj2->isEqual(object)) return i;
    }

    return CC_INVALID_INDEX;
}