NetPlayServer: Remove unused code

GetPlayerList is always called on the client.
This commit is contained in:
Jasper St. Pierre 2013-08-18 09:50:21 -04:00
parent 5c3dcc50bc
commit 7a41acd8ff
2 changed files with 0 additions and 33 deletions

View File

@ -9,17 +9,6 @@ NetPlayServer::Client::Client()
memset(pad_map, -1, sizeof(pad_map));
}
// called from ---GUI--- thread
std::string NetPlayServer::Client::ToString() const
{
std::ostringstream ss;
ss << name << '[' << (char)(pid+'0') << "] : " << revision << " |";
for (unsigned int i=0; i<4; ++i)
ss << (pad_map[i]>=0 ? (char)(pad_map[i]+'1') : '-');
ss << '|';
return ss.str();
}
NetPlayServer::~NetPlayServer()
{
if (is_connected)
@ -484,25 +473,6 @@ unsigned int NetPlayServer::OnData(sf::Packet& packet, sf::SocketTCP& socket)
return 0;
}
// called from ---GUI--- thread
void NetPlayServer::GetPlayerList(std::string& list, std::vector<int>& pid_list)
{
std::lock_guard<std::recursive_mutex> lkp(m_crit.players);
std::ostringstream ss;
std::map<sf::SocketTCP, Client>::const_iterator
i = m_players.begin(),
e = m_players.end();
for ( ; i!=e; ++i)
{
ss << i->second.ToString() << " " << i->second.ping << "ms\n";
pid_list.push_back(i->second.pid);
}
list = ss.str();
}
// called from ---GUI--- thread / and ---NETPLAY--- thread
void NetPlayServer::SendChatMessage(const std::string& msg)
{

View File

@ -27,8 +27,6 @@ public:
NetPlayServer(const u16 port);
~NetPlayServer();
void GetPlayerList(std::string& list, std::vector<int>& pid_list);
bool ChangeGame(const std::string& game);
void SendChatMessage(const std::string& msg);
@ -53,7 +51,6 @@ private:
{
public:
Client();
std::string ToString() const;
PlayerId pid;
std::string name;