mail[Wesnoth-commits] r33995 - /trunk/src/config.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:45:
Author: silene
Date: Sat Mar 21 19:45:02 2009
New Revision: 33995

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33995&view=rev
Log:
Cleaned by using config::any_child new fields.

Modified:
    trunk/src/config.cpp

Modified: trunk/src/config.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/config.cpp?rev=33995&r1=33994&r2=33995&view=diff
==============================================================================
--- trunk/src/config.cpp (original)
+++ trunk/src/config.cpp Sat Mar 21 19:45:02 2009
@@ -63,9 +63,8 @@
 
 void config::append(const config& cfg)
 {
-       for(all_children_iterator i = cfg.ordered_begin(); i != 
cfg.ordered_end(); ++i) {
-               const any_child &value = *i;
-               add_child(*value.first,*value.second);
+       foreach (const any_child &value, cfg.all_children_range()) {
+               add_child(value.key, value.cfg);
        }
 
        for(string_map::const_iterator j = cfg.values.begin(); j != 
cfg.values.end(); ++j) {
@@ -235,9 +234,8 @@
 {
        values.erase(key);
 
-       for (all_children_iterator it = ordered_begin(); it != ordered_end(); 
++it)
-       {
-               const_cast<config*>(it->second)->recursive_clear_value(key);
+       foreach (const any_child &value, all_children_range()) {
+               const_cast<config *>(&value.cfg)->recursive_clear_value(key);
        }
 }
 




Related Messages


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