diff --git a/src/RageDisplay_OGL.cpp b/src/RageDisplay_OGL.cpp index 35767b7c96..c799a4a4d0 100644 --- a/src/RageDisplay_OGL.cpp +++ b/src/RageDisplay_OGL.cpp @@ -748,8 +748,8 @@ RString RageDisplay_Legacy::TryVideoMode( const VideoModeParams &p, bool &bNewDe /* Delete all render targets. They may have associated resources other than * the texture itself. */ - FOREACHM( unsigned, RenderTarget *, g_mapRenderTargets, rt ) - delete rt->second; + for (std::pair &rt : g_mapRenderTargets) + delete rt.second; g_mapRenderTargets.clear(); /* Recreate all vertex buffers. */