mail[Wesnoth-commits] r33907 - /trunk/src/game_events.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:08:
Author: silene
Date: Fri Mar 20 08:08:54 2009
New Revision: 33907

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

Modified:
    trunk/src/game_events.cpp

Modified: trunk/src/game_events.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_events.cpp?rev=33907&r1=33906&r2=33907&view=diff
==============================================================================
--- trunk/src/game_events.cpp (original)
+++ trunk/src/game_events.cpp Fri Mar 20 08:08:54 2009
@@ -3572,14 +3572,11 @@
                variable_manager(&state_of_game_)
        {
                assert(!manager_running);
-               const config::child_list& events_list = 
cfg.get_children("event");
-               for(config::child_list::const_iterator i = 
events_list.begin();
-                               i != events_list.end(); ++i) {
-                       
event_handlers.push_back(game_events::event_handler(*i));
-               }
-               std::vector<std::string> unit_ids = 
utils::split(cfg["unit_wml_ids"]);
-               for(std::vector<std::string>::const_iterator id_it = 
unit_ids.begin(); id_it != unit_ids.end(); ++id_it) {
-                       unit_wml_ids.insert(*id_it);
+               foreach (const config &ev, cfg.child_range("event")) {
+                       
event_handlers.push_back(game_events::event_handler(&ev));
+               }
+               foreach (const std::string &id, 
utils::split(cfg["unit_wml_ids"])) {
+                       unit_wml_ids.insert(id);
                }
 
                teams = &teams_;




Related Messages


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