We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
Adding CCLOG before original path is returned in CCFileUtils::fullPathForFileName to aid in debugging
Adding CCLOG before original path is returned in CCFileUtils::fullPathForFileName to aid in debugging
Refactor #2127 [Closed]
Fixed at https://github.com/cocos2d/cocos2d-x/pull/2422.
The PR has fix two issues:
1) Added additional CCLOG to CCFileUtils::fullPathForFilename:
There’s currently no way to be sure, from a calling function, that
fullPathForFilename has returned an invalid file path, which makes it
difficult to quickly track down missing, or incorrect file paths. Added
a CCLOG before the original string is returned to make debugging
missing or incorrect file paths easier.
2) Optmization to ccArrayGetIndexOfObject …
Optimized loop of ccArrayGetIndexOfObject to remove the overhead of 3
pointer dereferences per iteration, and pre-increment the int for
speed. If this function is called a lot, and with a large list, this
will result in a good performance win.
This can probably be done with just pointers, but I haven’t taken the
time to validate all function calls to make sure it would be
appropriate. Though I can guarantee that if this worked fine before, it
will work fine with this change.