mail[Wesnoth-commits] r40371 - /trunk/src/unit.cpp


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

Header


Content

Posted by guillaume . melquiond on December 24, 2009 - 14:59:
Author: silene
Date: Thu Dec 24 14:59:41 2009
New Revision: 40371

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40371&view=rev
Log:
Avoided keeping useless config objects around.

Modified:
    trunk/src/unit.cpp

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=40371&r1=40370&r2=40371&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Thu Dec 24 14:59:41 2009
@@ -275,7 +275,7 @@
        }
        if (const config &variables = cfg.child("variables")) {
                variables_ = variables;
-               cfg_.remove_child("variables",0);
+               cfg_.clear_children("variables");
        }
 
        facing_ = map_location::parse_direction(cfg["facing"]);
@@ -283,7 +283,7 @@
 
        if (const config &mods = cfg.child("modifications")) {
                modifications_ = mods;
-               cfg_.remove_child("modifications",0);
+               cfg_.clear_children("modifications");
        }
 
        advance_to(type(), use_traits, state);
@@ -418,7 +418,7 @@
                                set_state(st.first, true);
                        }
                }
-               cfg_.remove_child("status",0);
+               cfg_.clear_children("status");
        }
        if(cfg["ai_special"] == "guardian") {
                set_state("guardian", true);




Related Messages


Powered by MHonArc, Updated Thu Dec 24 19:40:11 2009