Adjust all map loops remaining.

Two more macro loops to remove.
This commit is contained in:
Jason Felds
2013-04-28 16:42:03 -04:00
parent 581b119c5b
commit ce2cda0f85
2 changed files with 9 additions and 13 deletions
+9 -9
View File
@@ -53,9 +53,9 @@ RageTextureManager::~RageTextureManager()
void RageTextureManager::Update( float fDeltaTime )
{
FOREACHM( RageTextureID, RageTexture*, m_mapPathToTexture, i )
for(std::pair<RageTextureID const &, RageTexture *> i : m_mapPathToTexture)
{
RageTexture* pTexture = i->second;
RageTexture* pTexture = i.second;
pTexture->Update( fDeltaTime );
}
}
@@ -208,11 +208,11 @@ void RageTextureManager::DeleteTexture( RageTexture *t )
ASSERT( t->m_iRefCount == 0 );
LOG->Trace( "RageTextureManager: deleting '%s'.", t->GetID().filename.c_str() );
FOREACHM( RageTextureID, RageTexture*, m_mapPathToTexture, i )
for (map<RageTextureID, RageTexture *>::iterator iter = m_mapPathToTexture.begin(); iter != m_mapPathToTexture.end(); ++iter)
{
if( i->second == t )
if( iter->second == t )
{
m_mapPathToTexture.erase( i ); // remove map entry
m_mapPathToTexture.erase( iter ); // remove map entry
SAFE_DELETE( t ); // free the texture
return;
}
@@ -277,9 +277,9 @@ void RageTextureManager::ReloadAll()
* ton of cached data that we're not necessarily going to use. */
DoDelayedDelete();
FOREACHM( RageTextureID, RageTexture*, m_mapPathToTexture, i )
for (auto const & i : m_mapPathToTexture)
{
i->second->Reload();
i.second->Reload();
}
EnableOddDimensionWarning();
@@ -293,9 +293,9 @@ void RageTextureManager::ReloadAll()
* associated with a different texture). Ack. */
void RageTextureManager::InvalidateTextures()
{
FOREACHM( RageTextureID, RageTexture*, m_mapPathToTexture, i )
for (auto const & i : m_mapPathToTexture)
{
RageTexture* pTexture = i->second;
RageTexture* pTexture = i.second;
pTexture->Invalidate();
}
}