mail[Wesnoth-commits] r33880 - /trunk/src/map_label.cpp


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

Header


Content

Posted by guillaume . melquiond on March 20, 2009 - 08:07:
Author: silene
Date: Fri Mar 20 08:07:06 2009
New Revision: 33880

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

Modified:
    trunk/src/map_label.cpp

Modified: trunk/src/map_label.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map_label.cpp?rev=33880&r1=33879&r2=33880&view=diff
==============================================================================
--- trunk/src/map_label.cpp (original)
+++ trunk/src/map_label.cpp Fri Mar 20 08:07:06 2009
@@ -15,6 +15,7 @@
 #include "global.hpp"
 
 #include "display.hpp"
+#include "foreach.hpp"
 #include "map_label.hpp"
 #include "formula_string_utils.hpp"
 
@@ -76,10 +77,10 @@
 {
        clear_all();
 
-       const config::child_list& items = cfg.get_children("label");
-       for(config::child_list::const_iterator i = items.begin(); i != 
items.end(); ++i) {
-               const map_location loc(**i, variables);
-               terrain_label* label = new terrain_label(*this, **i, 
variables);
+       foreach (const config &i, cfg.child_range("label"))
+       {
+               const map_location loc(i, variables);
+               terrain_label* label = new terrain_label(*this, i, variables);
                add_label(loc, label);
        }
        recalculate_labels();




Related Messages


Powered by MHonArc, Updated Fri Mar 20 08:20:30 2009