Author: boucman
Date: Mon Aug 1 16:35:37 2011
New Revision: 50527
URL: http://svn.gna.org/viewcvs/wesnoth?rev=50527&view=rev
Log:
apply patch #2659 : Correctly display XP setting in lobby.
Modified:
trunk/src/map_location.hpp
trunk/src/multiplayer_lobby.cpp
Modified: trunk/src/map_location.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/map_location.hpp?rev=50527&r1=50526&r2=50527&view=diff
==============================================================================
--- trunk/src/map_location.hpp (original)
+++ trunk/src/map_location.hpp Mon Aug 1 16:35:37 2011
@@ -24,6 +24,7 @@
#include <string>
#include <vector>
#include <set>
+#include <boost/unordered_map.hpp>
#define MAX_MAP_AREA 65536
@@ -98,6 +99,8 @@
static DIRECTION get_opposite_dir(DIRECTION d);
static const map_location null_location;
+
+ friend std::size_t hash_value(map_location const &a);
};
/** Function which tells if two locations are adjacent. */
@@ -138,4 +141,10 @@
/** Dumps a vector of positions on a stream, for debug purposes. */
std::ostream &operator<<(std::ostream &s, std::vector<map_location> const &v);
+/** Inlined bodies **/
+inline std::size_t hash_value(map_location const & a){
+ boost::hash<size_t> h;
+ return h( (a.x << 16) ^ a.y );
+}
+
#endif
Modified: trunk/src/multiplayer_lobby.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/multiplayer_lobby.cpp?rev=50527&r1=50526&r2=50527&view=diff
==============================================================================
--- trunk/src/multiplayer_lobby.cpp (original)
+++ trunk/src/multiplayer_lobby.cpp Mon Aug 1 16:35:37 2011
@@ -582,7 +582,7 @@
} else {
games_.back().time_limit = "";
}
- games_.back().xp = game["experience_modifier"] + "%";
+ games_.back().xp = game["experience_modifier"].str() + "%";
games_.back().observers = game["observer"].to_bool(true);
games_.back().shuffle_sides =
game["shuffle_sides"].to_bool(true);
games_.back().verified = verified;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits