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
|
/* Delete all render targets. They may have associated resources other than
|
||||||
* the texture itself. */
|
* the texture itself. */
|
||||||
FOREACHM( unsigned, RenderTarget *, g_mapRenderTargets, rt )
|
for (std::pair<unsigned const, RenderTarget *> &rt : g_mapRenderTargets)
|
||||||
delete rt->second;
|
delete rt.second;
|
||||||
g_mapRenderTargets.clear();
|
g_mapRenderTargets.clear();
|
||||||
|
|
||||||
/* Recreate all vertex buffers. */
|
/* Recreate all vertex buffers. */
|
||||||
|
|||||||
Reference in New Issue
Block a user