mirror of
https://github.com/celisej567/mcpe.git
synced 2026-01-04 14:09:47 +03:00
* Fix broken replacement of unordered_map -> map.
TODO: find a hash table implementation for pre-C++11 and restore it!
This commit is contained in:
@@ -25,21 +25,9 @@ struct OnlinePlayer
|
||||
OnlinePlayer(Player* p, const RakNet::RakNetGUID& guid) : m_pPlayer(p), m_guid(guid) {}
|
||||
};
|
||||
|
||||
struct RakNetGUIDHasher
|
||||
{
|
||||
size_t operator()(const RakNet::RakNetGUID& guid) const
|
||||
{
|
||||
return size_t(guid.g);
|
||||
}
|
||||
bool operator()(const RakNet::RakNetGUID& guid1, const RakNet::RakNetGUID& guid2) const
|
||||
{
|
||||
return guid1 == guid2;
|
||||
}
|
||||
};
|
||||
|
||||
typedef void(ServerSideNetworkHandler::* CommandFunction)(OnlinePlayer* player, const std::vector<std::string>& parms);
|
||||
typedef std::map<std::string, CommandFunction> CommandMap;
|
||||
typedef std::map<RakNet::RakNetGUID, OnlinePlayer*, RakNetGUIDHasher> OnlinePlayerMap;
|
||||
typedef std::map<RakNet::RakNetGUID, OnlinePlayer*> OnlinePlayerMap;
|
||||
|
||||
class ServerSideNetworkHandler : public NetEventCallback, public LevelListener
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user