Texture Cache Question

I have the following code snip:

@
auto texture = TextureCache::getInstance()->addImage( “level1.png” );
auto texture2 = TextureCache::getInstance()->getTextureForKey( “level1.png” );
CCAssert( texture2 == texture, “How does this work?” );
@

The assertion fails.

How do I use the texture cache. The documentation says it uses the filename as key, which I assumed to mean the string I passed in as the filename. Perhaps it uses some other string (fully qualified filename perhaps?). Or is the following code supposed to pass the assertion?

Regards,

Ben

Answering my own question, it looks like it internally calls, FileUtils::getInstance->getFullPathForFilename() and uses this as the key.

The code documentation here really could use some updating. The only way to get at the stored texture is to call getFullPathForFilename() and this is not clear without looking at the code. Is there a wiki page on contributing to the project?

Regards,

Ben