aboutsummaryrefslogtreecommitdiff
path: root/src/mainmenumanager.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-08-18 18:18:25 +0200
committerGitHub <noreply@github.com>2017-08-18 18:18:25 +0200
commitc42753338924bb29c61081c9f269772f89bcd808 (patch)
tree3ccbf49ad802c57a1288ea978268315b68d8e65f /src/mainmenumanager.h
parentfb196be8cf8606cfab144e2fe62d9c9d1f50932f (diff)
downloadminetest-c42753338924bb29c61081c9f269772f89bcd808.tar.gz
minetest-c42753338924bb29c61081c9f269772f89bcd808.tar.bz2
minetest-c42753338924bb29c61081c9f269772f89bcd808.zip
Modernize various files (src/m*) (#6267)
* Modernize various files (src/m*) * range-based for loops * code style * C++ headers instead of C headers * Default operators * empty function Thanks to clang-tidy
Diffstat (limited to 'src/mainmenumanager.h')
-rw-r--r--src/mainmenumanager.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/mainmenumanager.h b/src/mainmenumanager.h
index 2618d3ccf..49bc88dff 100644
--- a/src/mainmenumanager.h
+++ b/src/mainmenumanager.h
@@ -48,11 +48,8 @@ class MainMenuManager : public IMenuManager
public:
virtual void createdMenu(gui::IGUIElement *menu)
{
- for(std::list<gui::IGUIElement*>::iterator
- i = m_stack.begin();
- i != m_stack.end(); ++i)
- {
- assert(*i != menu);
+ for (gui::IGUIElement *i : m_stack) {
+ assert(i != menu);
}
if(!m_stack.empty())
@@ -103,10 +100,8 @@ public:
bool pausesGame()
{
- for(std::list<gui::IGUIElement*>::iterator
- i = m_stack.begin(); i != m_stack.end(); ++i)
- {
- GUIModalMenu *mm = dynamic_cast<GUIModalMenu*>(*i);
+ for (gui::IGUIElement *i : m_stack) {
+ GUIModalMenu *mm = dynamic_cast<GUIModalMenu*>(i);
if (mm && mm->pausesGame())
return true;
}
@@ -123,8 +118,8 @@ extern bool isMenuActive();
class MainGameCallback : public IGameCallback
{
public:
- MainGameCallback() {}
- virtual ~MainGameCallback() {}
+ MainGameCallback() = default;
+ virtual ~MainGameCallback() = default;
virtual void exitToOS()
{