From c42753338924bb29c61081c9f269772f89bcd808 Mon Sep 17 00:00:00 2001 From: Loïc Blot Date: Fri, 18 Aug 2017 18:18:25 +0200 Subject: 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 --- src/modalMenu.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/modalMenu.h') 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 &children = getChildren(); core::list children_copy; - for(core::list::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::Iterator - i = children_copy.begin(); - i != children_copy.end(); i++) - { - (*i)->remove(); + + for (gui::IGUIElement *i : children_copy) { + i->remove(); } } -- cgit v1.2.3