change iterator erasing so we don't need to overload the = operator

This commit is contained in:
Jonathan Gray 2013-04-22 19:25:33 +10:00
parent df9e8b2224
commit e1fa7930f5
3 changed files with 7 additions and 6 deletions

View file

@ -2383,7 +2383,7 @@ int CSequencer::DestroySequence( CSequence *sequence, CIcarus* icarus )
{
if((*tsi).second == sequence)
{
tsi = m_taskSequences.erase(tsi);
m_taskSequences.erase(tsi++);
}
else
{

View file

@ -1071,8 +1071,8 @@ void R_Images_DeleteLightMaps(void)
if (pImage->imgName[0] == '$' /*&& strstr(pImage->imgName,"lightmap")*/) // loose check, but should be ok
{
R_Images_DeleteImageContents(pImage);
itImage = AllocatedImages.erase(itImage);
AllocatedImages.erase(itImage++);
bEraseOccured = qtrue;
}
}
@ -1221,7 +1221,8 @@ qboolean RE_RegisterImages_LevelLoadEnd(void)
{ // nope, so dump it...
//VID_Printf( PRINT_DEVELOPER, "Dumping image \"%s\"\n",pImage->imgName);
R_Images_DeleteImageContents(pImage);
itImage = AllocatedImages.erase(itImage);
AllocatedImages.erase(itImage++);
bEraseOccured = qtrue;
}
}

View file

@ -278,7 +278,7 @@ qboolean RE_RegisterModels_LevelLoadEnd(qboolean bDeleteEverythingNotUsedThisLev
bAtLeastoneModelFreed = qtrue;
}
itModel = CachedModels->erase(itModel);
CachedModels->erase(itModel++);
bEraseOccured = qtrue;
iLoadedModelBytes = GetModelDataAllocSize();
@ -328,7 +328,7 @@ static void RE_RegisterModels_DeleteAll(void)
Z_Free(CachedModel.pModelDiskImage);
}
itModel = CachedModels->erase(itModel);
CachedModels->erase(itModel++);
}
extern void RE_AnimationCFGs_DeleteAll(void);
@ -1194,4 +1194,4 @@ void R_ModelFree(void)
CachedModels = NULL;
}
}
#endif
#endif