Use the foreach construct.
Hmm...another opportunity for smart pointers?
This commit is contained in:
@@ -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<unsigned const, RenderTarget *> &rt : g_mapRenderTargets)
|
||||
delete rt.second;
|
||||
g_mapRenderTargets.clear();
|
||||
|
||||
/* Recreate all vertex buffers. */
|
||||
|
||||
Reference in New Issue
Block a user