Author: silene
Date: Sun Apr  5 19:05:04 2009
New Revision: 34553

URL: http://svn.gna.org/viewcvs/wesnoth?rev=34553&view=rev
Log:
Removed config::get_children.

Modified:
    trunk/src/editor2/editor_palettes.cpp

Modified: trunk/src/editor2/editor_palettes.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_palettes.cpp?rev=34553&r1=34552&r2=34553&view=diff
==============================================================================
--- trunk/src/editor2/editor_palettes.cpp (original)
+++ trunk/src/editor2/editor_palettes.cpp Sun Apr  5 19:05:04 2009
@@ -77,12 +77,11 @@
        }
 
        // Get the available groups and add them to the structure
-       const config::child_list& groups = cfg.get_children("editor_group");
-       config::child_list::const_iterator g_itor = groups.begin();
        std::set<std::string> group_names;
-       for(; g_itor != groups.end(); ++ g_itor) {
-               if (group_names.find((**g_itor)["id"]) == group_names.end()) {
-                       terrain_groups_.push_back(terrain_group(**g_itor, gui));
+       foreach (const config &g, cfg.child_range("editor_group"))
+       {
+               if (group_names.find(g["id"]) == group_names.end()) {
+                       terrain_groups_.push_back(terrain_group(g, gui));
                        group_names.insert(terrain_groups_.back().id);
                        // By default the 'all'-button is pressed
                        if(terrain_groups_.back().id == "all") {


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to