mail[Wesnoth-commits] r27596 - in /trunk/src: gamestatus.cpp preferences.cpp statistics.cpp


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

Header


Content

Posted by alinktomine on June 29, 2008 - 22:18:
Author: alink
Date: Sun Jun 29 22:18:44 2008
New Revision: 27596

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27596&view=rev
Log:
convert the few true/false used in code to yes/no
(which seems to be the standard and is now faster and smaller)

Modified:
    trunk/src/gamestatus.cpp
    trunk/src/preferences.cpp
    trunk/src/statistics.cpp

Modified: trunk/src/gamestatus.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gamestatus.cpp?rev=27596&r1=27595&r2=27596&view=diff
==============================================================================
--- trunk/src/gamestatus.cpp (original)
+++ trunk/src/gamestatus.cpp Sun Jun 29 22:18:44 2008
@@ -481,7 +481,7 @@
 
        cfg["gold"] = buf;
 
-       cfg["gold_add"] = player.gold_add ? "true" : "false";
+       cfg["gold_add"] = player.gold_add ? "yes" : "no";
 
        for(std::vector<unit>::const_iterator i = 
player.available_units.begin();
            i != player.available_units.end(); ++i) {

Modified: trunk/src/preferences.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/preferences.cpp?rev=27596&r1=27595&r2=27596&view=diff
==============================================================================
--- trunk/src/preferences.cpp (original)
+++ trunk/src/preferences.cpp Sun Jun 29 22:18:44 2008
@@ -119,7 +119,7 @@
 
 void _set_fullscreen(bool ison)
 {
-       prefs["fullscreen"] = (ison ? "true" : "false");
+       prefs["fullscreen"] = (ison ? "yes" : "no");
 }
 
 int min_allowed_width()
@@ -171,7 +171,7 @@
 
 void _set_turbo(bool ison)
 {
-       prefs["turbo"] = (ison ? "true" : "false");
+       prefs["turbo"] = (ison ? "yes" : "no");
 }
 
 double turbo_speed()
@@ -247,7 +247,7 @@
 
 void _set_grid(bool ison)
 {
-       preferences::set("grid",  (ison ? "true" : "false"));
+       preferences::set("grid",  (ison ? "yes" : "no"));
 }
 
 size_t sound_buffer_size()

Modified: trunk/src/statistics.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/statistics.cpp?rev=27596&r1=27595&r2=27596&view=diff
==============================================================================
--- trunk/src/statistics.cpp (original)
+++ trunk/src/statistics.cpp Sun Jun 29 22:18:44 2008
@@ -640,7 +640,7 @@
 config write_stats()
 {
        config res;
-       res["mid_scenario"] = (mid_scenario ? "true" : "false");
+       res["mid_scenario"] = (mid_scenario ? "yes" : "no");
 
        for(std::vector<scenario_stats>::const_iterator i = 
master_stats.begin(); i != master_stats.end(); ++i) {
                res.add_child("scenario",i->write());
@@ -651,7 +651,7 @@
 
 void write_stats(config_writer &out)
 {
-       out.write_key_val("mid_scenario", mid_scenario ? "true" : "false");
+       out.write_key_val("mid_scenario", mid_scenario ? "yes" : "no");
 
        for(std::vector<scenario_stats>::const_iterator i = 
master_stats.begin(); i != master_stats.end(); ++i) {
                out.open_child("scenario");




Related Messages


Powered by MHonArc, Updated Sun Jun 29 23:02:18 2008