summaryrefslogtreecommitdiff
path: root/src/modalMenu.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/modalMenu.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/modalMenu.h')
-rw-r--r--src/modalMenu.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/modalMenu.h b/src/modalMenu.h
index eeffc6195..f41591c3f 100644
--- a/src/modalMenu.h
+++ b/src/modalMenu.h
@@ -111,16 +111,12 @@ public:
{
const core::list<gui::IGUIElement*> &children = getChildren();
core::list<gui::IGUIElement*> children_copy;
- for(core::list<gui::IGUIElement*>::ConstIterator
- i = children.begin(); i != children.end(); i++)
- {
- children_copy.push_back(*i);
+ for (gui::IGUIElement *i : children) {
+ children_copy.push_back(i);
}
- for(core::list<gui::IGUIElement*>::Iterator
- i = children_copy.begin();
- i != children_copy.end(); i++)
- {
- (*i)->remove();
+
+ for (gui::IGUIElement *i : children_copy) {
+ i->remove();
}
}