mail[Wesnoth-commits] r33988 - /trunk/src/serialization/parser.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on March 21, 2009 - 19:44:
Author: silene
Date: Sat Mar 21 19:44:39 2009
New Revision: 33988

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33988&view=rev
Log:
Moved to loops based on config::all_children_range.

Modified:
    trunk/src/serialization/parser.cpp

Modified: trunk/src/serialization/parser.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/serialization/parser.cpp?rev=33988&r1=33987&r2=33988&view=diff
==============================================================================
--- trunk/src/serialization/parser.cpp (original)
+++ trunk/src/serialization/parser.cpp Sat Mar 21 19:44:39 2009
@@ -488,14 +488,11 @@
                write_key_val(out, i.first, i.second, tab, textdomain);
        }
 
-       for(config::all_children_iterator j = cfg.ordered_begin(), j_end = 
cfg.ordered_end(); j != j_end; ++j) {
-               const config::any_child &item = *j;
-               const std::string& name = *item.first;
-               const config& cfg = *item.second;
-
-               write_open_child(out, name, tab);
-               write_internal(cfg, out, textdomain, tab + 1);
-               write_close_child(out, name, tab);
+       foreach (const config::any_child &item, cfg.all_children_range())
+       {
+               write_open_child(out, item.key, tab);
+               write_internal(item.cfg, out, textdomain, tab + 1);
+               write_close_child(out, item.key, tab);
        }
 }
 




Related Messages


Powered by MHonArc, Updated Sat Mar 21 20:00:36 2009