- use 'for' iterator syntax to check touching_renderlists.

This commit is contained in:
Christoph Oelckers 2016-12-25 19:37:07 +01:00
commit 5723f10cc3
2 changed files with 2 additions and 6 deletions

View file

@ -6707,10 +6707,8 @@ void P_UnlinkRenderSectors(AActor* thing)
{
if (thing->touching_render_sectors)
{
for (std::forward_list<sector_t*>::iterator it = thing->touching_render_sectors->begin();
it != thing->touching_render_sectors->end(); it++)
for (auto sec : *thing->touching_render_sectors)
{
sector_t* sec = (*it);
if (sec->touching_render_things)
{
sec->touching_render_things->remove(thing);