mail[Wesnoth-commits] r33895 - /trunk/src/hotkeys.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:00 2009
New Revision: 33895

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

Modified:
    trunk/src/hotkeys.cpp

Modified: trunk/src/hotkeys.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/hotkeys.cpp?rev=33895&r1=33894&r2=33895&view=diff
==============================================================================
--- trunk/src/hotkeys.cpp (original)
+++ trunk/src/hotkeys.cpp Fri Mar 20 08:08:00 2009
@@ -18,6 +18,7 @@
 
 #include "construct_dialog.hpp"
 #include "display.hpp"
+#include "foreach.hpp"
 #include "hotkeys.hpp"
 #include "game_end_exceptions.hpp"
 #include "gettext.hpp"
@@ -452,11 +453,11 @@
 
 void load_hotkeys(const config& cfg)
 {
-       const config::child_list& children = 
cfg.get_children(hotkey_tag_name);
-       for(config::child_list::const_iterator i = children.begin(); i != 
children.end(); ++i) {
-               hotkey_item& h = get_hotkey((**i)["command"]);
+       foreach (const config &hk, cfg.child_range(hotkey_tag_name))
+       {
+               hotkey_item& h = get_hotkey(hk["command"]);
                if(h.get_id() != HOTKEY_NULL) {
-                       h.load_from_config(**i);
+                       h.load_from_config(hk);
                }
        }
 }




Related Messages


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