mirror of https://github.com/axmolengine/axmol.git
c45ebfa628
fixed #2127: Adding CCLOG before original path is returned in CCFileUtils::fullPathForFileName to aid in debugging. 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. |
||
---|---|---|
.. | ||
android | ||
blackberry | ||
emscripten | ||
ios | ||
linux | ||
mac | ||
marmalade | ||
nacl | ||
third_party | ||
win32 | ||
CCAccelerometerDelegate.h | ||
CCApplicationProtocol.h | ||
CCCommon.h | ||
CCDevice.h | ||
CCEGLViewProtocol.cpp | ||
CCEGLViewProtocol.h | ||
CCFileUtils.cpp | ||
CCFileUtils.h | ||
CCImage.h | ||
CCImageCommonWebp.cpp | ||
CCImageCommon_cpp.h | ||
CCPlatformConfig.h | ||
CCPlatformMacros.h | ||
CCSAXParser.cpp | ||
CCSAXParser.h | ||
CCThread.cpp | ||
CCThread.h | ||
platform.cpp | ||
platform.h |