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


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

Header


Content

Posted by alinktomine on September 26, 2007 - 16:28:
Author: alink
Date: Wed Sep 26 16:27:40 2007
New Revision: 20718

URL: http://svn.gna.org/viewcvs/wesnoth?rev=20718&view=rev
Log:
Server names were also affected by bug #9021 (translated name not updated when
switching language). But the previous fix for this bug was canceled by a
useless copy of game_config values in preferences. So, fix and simplify the 
code by removing it.

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=20718&r1=20717&r2=20718&view=diff
==============================================================================
--- trunk/src/game_preferences.cpp (original)
+++ trunk/src/game_preferences.cpp Wed Sep 26 16:27:40 2007
@@ -148,21 +148,7 @@
 
 const std::vector<game_config::server_info>& server_list()
 {
-       static std::vector<game_config::server_info> pref_servers;
-       if(pref_servers.empty()) {
-               std::vector<game_config::server_info> &game_servers = 
game_config::server_list;
-               wassert(game_servers.size() > 0);
-               pref_servers.insert(pref_servers.begin(), 
game_servers.begin(), game_servers.end());
-               const std::vector<config *> &user_servers = 
get_prefs()->get_children("server");
-               std::vector<config *>::const_iterator server;
-               for(server = user_servers.begin(); server != 
user_servers.end(); ++server) {
-                       game_config::server_info sinf;
-                       sinf.name = (**server)["name"];
-                       sinf.address = (**server)["address"];
-                       pref_servers.push_back(sinf);
-               }
-       }
-       return pref_servers;
+       return game_config::server_list;
 }
 
 const std::string network_host()




Related Messages


Powered by MHonArc, Updated Wed Sep 26 16:40:51 2007