Projects > cpp > Issues > Bug #948

We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.

Create Issue on Github

CCMutableArray::getIndexOfObject returns 0 on both "index 0" and "not existing"

Bug #948 [Closed]
walzer@cocos2d-x.org 2012-01-16 01:25 . Updated over 4 years ago

Index of array starts from 0, but this function return 0 to indicate an error, e.g. pObject isn’t existing in the array.

walzer@cocos2d-x.org 2012-01-16 01:28
  • Subject changed from CCMutableArray::getIndexOfObject returns 0 on both "index 0" and "not exist" to CCMutableArray::getIndexOfObject returns 0 on both "index 0" and "not existing"
  • Description updated (diff)
zhangxm 2012-02-14 02:38
  • Assignee set to zhangxm

NSMutableArray doesn’t have similar method, and this method didn’t be used.
So can remove this method.

zhangxm 2012-02-14 03:07
  • Status changed from New to Resolved
zhangxm 2012-02-14 03:08
  • % Done changed from 0 to 100
zhangxm 2012-02-18 06:05

Applied in changeset commit:f5d25539d7c6f302ea179024cac652dda2d7760a.

zhangxm 2012-02-18 06:05

Applied in changeset commit:2b31c050a26336b090f1190948e5d96d939a0f36.

zhangxm 2012-02-27 09:01
  • Status changed from Resolved to Closed
walzer@cocos2d-x.org 2012-05-25 08:00
  • Project changed from cocos2d-x to cpp
  • Category deleted (5)
  • Target version deleted (cocos2d-1.0.1-x-0.12.0)

Atom PDF

Status:Closed
Start date:2012-01-16
Priority:Normal
Due date:
Assignee:zhangxm
% Done:

100%

Category:-
Target version:-

Sign up for our newsletter to keep up with the latest developments, releases and updates for Cocos2d-x.