From: Perttu Ahola Date: Sun, 25 Mar 2012 01:06:43 +0000 (+0300) Subject: Make event_manager.h build on MSVC X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=04085cad3cc154a48c72127ef816bf25ca636f74;p=zefram%2Fminetest%2Fminetest_engine.git Make event_manager.h build on MSVC --- diff --git a/src/event_manager.h b/src/event_manager.h index b33d5a29..9492a2fd 100644 --- a/src/event_manager.h +++ b/src/event_manager.h @@ -77,26 +77,26 @@ public: std::map::iterator i = m_dest.find(type); if(i != m_dest.end()){ std::list &funcs = i->second.funcs; - std::list::iterator i = funcs.begin(); - while(i != funcs.end()){ - bool remove = (i->f == f && (!data || i->d == data)); + std::list::iterator j = funcs.begin(); + while(j != funcs.end()){ + bool remove = (j->f == f && (!data || j->d == data)); if(remove) - funcs.erase(i++); + funcs.erase(j++); else - i++; + j++; } } } else{ for(std::map::iterator i = m_dest.begin(); i != m_dest.end(); i++){ std::list &funcs = i->second.funcs; - std::list::iterator i = funcs.begin(); - while(i != funcs.end()){ - bool remove = (i->f == f && (!data || i->d == data)); + std::list::iterator j = funcs.begin(); + while(j != funcs.end()){ + bool remove = (j->f == f && (!data || j->d == data)); if(remove) - funcs.erase(i++); + funcs.erase(j++); else - i++; + j++; } } }