diff --git a/CODE-mp/qcommon/RoffSystem.cpp b/CODE-mp/qcommon/RoffSystem.cpp index e53598e..2a9d89e 100644 --- a/CODE-mp/qcommon/RoffSystem.cpp +++ b/CODE-mp/qcommon/RoffSystem.cpp @@ -406,15 +406,7 @@ qboolean CROFFSystem::Unload( int id ) { // requested item found in the list, free mem, then remove from list delete ((CROFF *)(*itr).second); -#ifndef __linux__ - itr = mROFFList.erase( itr ); -#else - // darn stl differences - TROFFList::iterator titr; - titr = itr; - itr++; - mROFFList.erase(titr); -#endif + mROFFList.erase( itr++ ); #ifdef _DEBUG Com_Printf( S_COLOR_GREEN"roff unloaded\n" ); diff --git a/CODE-mp/renderer/tr_image.cpp b/CODE-mp/renderer/tr_image.cpp index d97a8e7..01b51ae 100644 --- a/CODE-mp/renderer/tr_image.cpp +++ b/CODE-mp/renderer/tr_image.cpp @@ -795,15 +795,8 @@ void R_Images_DeleteLightMaps(void) if (pImage->imgName[0] == '*' && strstr(pImage->imgName,"lightmap")) // loose check, but should be ok { R_Images_DeleteImageContents(pImage); -#ifndef __linux__ - itImage = AllocatedImages.erase(itImage); + AllocatedImages.erase(itImage++); bEraseOccured = qtrue; -#else - // MS & Dinkimware got the map::erase return wrong (it's null) - AllocatedImages_t::iterator itTemp = itImage; - itImage++; - AllocatedImages.erase(itTemp); -#endif } } @@ -899,14 +892,8 @@ qboolean RE_RegisterImages_LevelLoadEnd(void) ri.Printf( PRINT_DEVELOPER, "Dumping image \"%s\"\n",pImage->imgName); R_Images_DeleteImageContents(pImage); -#ifndef __linux__ - itImage = AllocatedImages.erase(itImage); + AllocatedImages.erase(itImage++); bEraseOccured = qtrue; -#else - AllocatedImages_t::iterator itTemp = itImage; - itImage++; - AllocatedImages.erase(itTemp); -#endif } } } diff --git a/CODE-mp/renderer/tr_model.cpp b/CODE-mp/renderer/tr_model.cpp index c4c29f1..eb58091 100644 --- a/CODE-mp/renderer/tr_model.cpp +++ b/CODE-mp/renderer/tr_model.cpp @@ -361,18 +361,8 @@ qboolean RE_RegisterModels_LevelLoadEnd(qboolean bDeleteEverythingNotUsedThisLev //CachedModel.pModelDiskImage = NULL; // REM for reference, erase() call below negates the need for it. bAtLeastoneModelFreed = qtrue; } -#ifndef __linux__ - itModel = CachedModels.erase(itModel); + CachedModels.erase(itModel++); bEraseOccured = qtrue; -#else - // Both MS and Dinkumware got the map::erase wrong - // The STL has the return type as a void - CachedModels_t::iterator itTemp; - itTemp = itModel; - itModel++; - CachedModels.erase(itTemp); - -#endif iLoadedModelBytes = GetModelDataAllocSize(); } @@ -418,18 +408,8 @@ static void RE_RegisterModels_DumpNonPure(void) Z_Free(CachedModel.pModelDiskImage); //CachedModel.pModelDiskImage = NULL; // REM for reference, erase() call below negates the need for it. } -#ifndef __linux__ - itModel = CachedModels.erase(itModel); + CachedModels.erase(itModel++); bEraseOccured = qtrue; -#else - // Both MS and Dinkumware got the map::erase wrong - // The STL has the return type as a void - CachedModels_t::iterator itTemp; - itTemp = itModel; - itModel++; - CachedModels.erase(itTemp); - -#endif } } } @@ -462,7 +442,6 @@ void RE_RegisterModels_Info_f( void ) // static void RE_RegisterModels_DeleteAll(void) { -#ifndef __linux__ for (CachedModels_t::iterator itModel = CachedModels.begin(); itModel != CachedModels.end(); ) { CachedEndianedModelBinary_t &CachedModel = (*itModel).second; @@ -471,11 +450,8 @@ static void RE_RegisterModels_DeleteAll(void) Z_Free(CachedModel.pModelDiskImage); } - itModel = CachedModels.erase(itModel); + CachedModels.erase(itModel++); } -#else - CachedModels.erase(CachedModels.begin(),CachedModels.end()); -#endif }