mail[Wesnoth-commits] r44624 - /trunk/src/game_preferences.cpp


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

Header


Content

Posted by guillaume . melquiond on July 24, 2010 - 10:48:
Author: silene
Date: Sat Jul 24 10:48:04 2010
New Revision: 44624

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44624&view=rev
Log:
Avoided costly roundtrip through strings.

Modified:
    trunk/src/game_preferences.cpp

Modified: trunk/src/game_preferences.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_preferences.cpp?rev=44624&r1=44623&r2=44624&view=diff
==============================================================================
--- trunk/src/game_preferences.cpp (original)
+++ trunk/src/game_preferences.cpp Sat Jul 24 10:48:04 2010
@@ -319,7 +319,7 @@
 void set_ping_timeout(unsigned int timeout)
 {
        network::ping_timeout = timeout;
-       preferences::set("ping_timeout", lexical_cast<std::string>(timeout));
+       preferences::set("ping_timeout", int(timeout));
 }
 
 std::string campaign_server()
@@ -442,7 +442,7 @@
 
 void set_mp_server_warning_disabled(int value)
 {
-       preferences::set("mp_server_warning_disabled", 
lexical_cast<std::string>(value));
+       preferences::set("mp_server_warning_disabled", value);
 }
 
 void set_mp_server_program_name(const std::string& path)
@@ -499,7 +499,7 @@
 
 void set_turns(int value)
 {
-       preferences::set("mp_turns", lexical_cast<std::string>(value));
+       preferences::set("mp_turns", value);
 }
 
 bool skip_mp_replay()
@@ -530,7 +530,7 @@
 
 void set_countdown_init_time(int value)
 {
-       preferences::set("mp_countdown_init_time", 
lexical_cast<std::string>(value));
+       preferences::set("mp_countdown_init_time", value);
 }
 
 int countdown_reservoir_time()
@@ -541,7 +541,7 @@
 
 void set_countdown_reservoir_time(int value)
 {
-       preferences::set("mp_countdown_reservoir_time", 
lexical_cast<std::string>(value));
+       preferences::set("mp_countdown_reservoir_time", value);
 }
 
 int countdown_turn_bonus()
@@ -552,7 +552,7 @@
 
 void set_countdown_turn_bonus(int value)
 {
-       preferences::set("mp_countdown_turn_bonus", 
lexical_cast<std::string>(value));
+       preferences::set("mp_countdown_turn_bonus", value);
 }
 
 int countdown_action_bonus()
@@ -563,7 +563,7 @@
 
 void set_countdown_action_bonus(int value)
 {
-       preferences::set("mp_countdown_action_bonus", 
lexical_cast<std::string>(value));
+       preferences::set("mp_countdown_action_bonus", value);
 }
 
 int village_gold()
@@ -573,7 +573,7 @@
 
 void set_village_gold(int value)
 {
-       preferences::set("mp_village_gold", lexical_cast<std::string>(value));
+       preferences::set("mp_village_gold", value);
 }
 
 int xp_modifier()
@@ -583,7 +583,7 @@
 
 void set_xp_modifier(int value)
 {
-       preferences::set("mp_xp_modifier", lexical_cast<std::string>(value));
+       preferences::set("mp_xp_modifier", value);
 }
 
 int era()
@@ -593,7 +593,7 @@
 
 void set_era(int value)
 {
-       preferences::set("mp_era", lexical_cast<std::string>(value));
+       preferences::set("mp_era", value);
 }
 
 int map()
@@ -603,7 +603,7 @@
 
 void set_map(int value)
 {
-       preferences::set("mp_map", lexical_cast<std::string>(value));
+       preferences::set("mp_map", value);
 }
 
 bool show_ai_moves()
@@ -673,7 +673,7 @@
 
 void set_autosavemax(int value)
 {
-       preferences::set("auto_save_max", lexical_cast<std::string>(value));
+       preferences::set("auto_save_max", value);
 }
 
 std::string client_type()
@@ -813,7 +813,7 @@
 
 void set_chat_lines(int lines)
 {
-       preferences::set("chat_lines", lexical_cast<std::string>(lines));
+       preferences::set("chat_lines", lines);
 }
 
 std::set<std::string> &encountered_units() {




Related Messages


Powered by MHonArc, Updated Sat Jul 24 11:00:13 2010