aboutsummaryrefslogtreecommitdiff
path: root/src/mainmenumanager.h
diff options
context:
space:
mode:
authorIlya Zhuravlev <zhuravlevilya@ya.ru>2012-12-20 21:19:49 +0400
committerkwolekr <kwolekr@minetest.net>2013-03-11 19:08:39 -0400
commit6a1670dbc31cc0e44178bbd9ad34ff0d5981a060 (patch)
treece32cd4be20e9be30367f2ad25d9dae6a0482898 /src/mainmenumanager.h
parente204bedf1d781e43b8caa334a99319efc5b7ce46 (diff)
downloadminetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.tar.gz
minetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.tar.bz2
minetest-6a1670dbc31cc0e44178bbd9ad34ff0d5981a060.zip
Migrate to STL containers/algorithms.
Diffstat (limited to 'src/mainmenumanager.h')
-rw-r--r--src/mainmenumanager.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mainmenumanager.h b/src/mainmenumanager.h
index ce7684f11..a3133686b 100644
--- a/src/mainmenumanager.h
+++ b/src/mainmenumanager.h
@@ -26,6 +26,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "debug.h" // assert
#include "modalMenu.h"
#include "guiPauseMenu.h" //For IGameCallback
+#include <list>
extern gui::IGUIEnvironment* guienv;
extern gui::IGUIStaticText *guiroot;
@@ -37,15 +38,15 @@ class MainMenuManager : public IMenuManager
public:
virtual void createdMenu(GUIModalMenu *menu)
{
- for(core::list<GUIModalMenu*>::Iterator
+ for(std::list<GUIModalMenu*>::iterator
i = m_stack.begin();
- i != m_stack.end(); i++)
+ i != m_stack.end(); ++i)
{
assert(*i != menu);
}
if(m_stack.size() != 0)
- (*m_stack.getLast())->setVisible(false);
+ m_stack.back()->setVisible(false);
m_stack.push_back(menu);
}
@@ -55,9 +56,9 @@ public:
bool removed_entry;
do{
removed_entry = false;
- for(core::list<GUIModalMenu*>::Iterator
+ for(std::list<GUIModalMenu*>::iterator
i = m_stack.begin();
- i != m_stack.end(); i++)
+ i != m_stack.end(); ++i)
{
if(*i == menu)
{
@@ -73,7 +74,7 @@ public:
m_stack.erase(i);*/
if(m_stack.size() != 0)
- (*m_stack.getLast())->setVisible(true);
+ m_stack.back()->setVisible(true);
}
u32 menuCount()
@@ -81,7 +82,7 @@ public:
return m_stack.size();
}
- core::list<GUIModalMenu*> m_stack;
+ std::list<GUIModalMenu*> m_stack;
};
extern MainMenuManager g_menumgr;