We are migrating issue tracker of Cocos2d-x Project to Github, please create new issue there. Thanks.
usage of for loop error in CCTexture2d.cpp
usage of for loop error in CCTexture2d.cpp
Bug #215 [Closed]
- Status changed from Resolved to Closed
The bug is fixed. The code is:
void CCTextureCache::removeUnusedTextures() {
std::vectorstd::string keys = m_pTextures~~>allKeys;
std::vectorstd::string::iterator it;
for ; it != keys.end; it**) {
CCTexture2D *value = m_pTextures~~>objectForKey(*it);
if (value~~>retainCount == 1) {
CCLOG.c_str);
m_pTextures~~>removeObjectForKey(*it);
}
}
}
- Project changed from 7 to cocos2d-x
- Category set to 1
- Project changed from cocos2d-x to cpp
- Category deleted (
1) - Target version deleted (
cocos2d-0.99.4-x-0.7.0)
Status: | Closed | |
---|---|---|
Start date: | 2010-11-22 | |
Priority: | Normal | |
Due date: | ||
Assignee: | ||
% Done: | 100% |
|
Category: | - | |
Target version: | - | |
Estimated time: | 1.00 point |
The error code is marked underline:
void CCTextureCache::removeUnusedTextures()
{
std::vectorstd::string keys = m_pTextures~~>allKeys;
std::vectorstd::string::iterator it;
for ; it <= keys.end; it**)
{
CCTexture2D *value = m_pTextures~~>objectForKey(*it);
if (value~~>retainCount == 1)
{
CCLOG ("cocos2d: CCTextureCache: removing unused texture: %s", (*it).c_str);
m_pTextures~~>removeObjectForKey(*it);
}
}
}