Skip to content
Snippets Groups Projects
Commit e6d6332a authored by Philip Trettner's avatar Philip Trettner
Browse files

Fixed cppcheck (error) Iterator 'i' used after element has been erased

parent 25a5a23b
Branches
No related tags found
No related merge requests found
Pipeline #
...@@ -79,9 +79,11 @@ void unregisterTextureLoadFunction(TextureLoadFuncPtr _function) ...@@ -79,9 +79,11 @@ void unregisterTextureLoadFunction(TextureLoadFuncPtr _function)
std::map<std::string,TextureLoadFuncPtr>::iterator n = textureLoadFunctions.end(); std::map<std::string,TextureLoadFuncPtr>::iterator n = textureLoadFunctions.end();
for(std::map<std::string,TextureLoadFuncPtr>::iterator i = textureLoadFunctions.begin() ; i != n ; i++) for(std::map<std::string,TextureLoadFuncPtr>::iterator i = textureLoadFunctions.begin() ; i != n ; i++)
{ {
if(i->second == _function) if(i->second == _function)
{
textureLoadFunctions.erase(i); textureLoadFunctions.erase(i);
break;
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment