mail[Wesnoth-commits] r33990 - /trunk/src/theme.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:46 2009
New Revision: 33990

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

Modified:
    trunk/src/theme.cpp

Modified: trunk/src/theme.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/theme.cpp?rev=33990&r1=33989&r2=33990&view=diff
==============================================================================
--- trunk/src/theme.cpp (original)
+++ trunk/src/theme.cpp Sat Mar 21 19:44:46 2009
@@ -224,10 +224,10 @@
 static void do_resolve_rects(const config& cfg, config& resolved_config, 
config* resol_cfg = NULL) {
 
                // recursively resolve children
-               for(config::all_children_iterator i = cfg.ordered_begin(); i 
!= cfg.ordered_end(); ++i) {
-                       const config::any_child &value = *i;
-                       config& childcfg = 
resolved_config.add_child(*value.first);
-                       do_resolve_rects(*value.second, childcfg, 
(*value.first =="resolution") ? &childcfg : resol_cfg);
+               foreach (const config::any_child &value, 
cfg.all_children_range()) {
+                       config &childcfg = 
resolved_config.add_child(value.key);
+                       do_resolve_rects(value.cfg, childcfg,
+                               value.key == "resolution" ? &childcfg : 
resol_cfg);
                }
 
                // copy all key/values




Related Messages


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