mail[Wesnoth-commits] r33826 - in /trunk/src: callable_objects.cpp formula_ai.cpp


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

Header


Content

Posted by dragonking on March 18, 2009 - 14:54:
Author: dragonking
Date: Wed Mar 18 14:54:16 2009
New Revision: 33826

URL: http://svn.gna.org/viewcvs/wesnoth?rev=33826&view=rev
Log:
Made use of utils::string_boo()

Modified:
    trunk/src/callable_objects.cpp
    trunk/src/formula_ai.cpp

Modified: trunk/src/callable_objects.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/callable_objects.cpp?rev=33826&r1=33825&r2=33826&view=diff
==============================================================================
--- trunk/src/callable_objects.cpp (original)
+++ trunk/src/callable_objects.cpp Wed Mar 18 14:54:16 2009
@@ -155,8 +155,8 @@
        } else if(key == "leader") {
                return variant(u_.can_recruit());
        } else if(key == "undead") {
-               if ( u_.get_state("not_living") == "yes" )
-                                       return variant( 1 );
+               if ( utils::string_bool(u_.get_state("not_living"))  )
+                    return variant( 1 );
 
                return variant( 0 );
        } else if(key == "attacks") {

Modified: trunk/src/formula_ai.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_ai.cpp?rev=33826&r1=33825&r2=33826&view=diff
==============================================================================
--- trunk/src/formula_ai.cpp (original)
+++ trunk/src/formula_ai.cpp Wed Mar 18 14:54:16 2009
@@ -1427,7 +1427,8 @@
        const config& ai_param = current_team().ai_parameters();
 
        // Check to see if we want to use eval_lists
-       if(ai_param.get_attribute("eval_list") == "yes") {
+
+       if( utils::string_bool( ai_param.get_attribute("eval_list") ) ) {
                use_eval_lists_ = true;
        }
 




Related Messages


Powered by MHonArc, Updated Wed Mar 18 16:20:31 2009