From 7a41acd8ffabe076df1b45ab5834da9ee3d6c73f Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Sun, 18 Aug 2013 09:50:21 -0400 Subject: [PATCH] NetPlayServer: Remove unused code GetPlayerList is always called on the client. --- Source/Core/Core/Src/NetPlayServer.cpp | 30 -------------------------- Source/Core/Core/Src/NetPlayServer.h | 3 --- 2 files changed, 33 deletions(-) diff --git a/Source/Core/Core/Src/NetPlayServer.cpp b/Source/Core/Core/Src/NetPlayServer.cpp index e6a96e8700..134045c5bf 100644 --- a/Source/Core/Core/Src/NetPlayServer.cpp +++ b/Source/Core/Core/Src/NetPlayServer.cpp @@ -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& pid_list) -{ - std::lock_guard lkp(m_crit.players); - - std::ostringstream ss; - - std::map::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) { diff --git a/Source/Core/Core/Src/NetPlayServer.h b/Source/Core/Core/Src/NetPlayServer.h index 95f98e2a73..4ef601bf06 100644 --- a/Source/Core/Core/Src/NetPlayServer.h +++ b/Source/Core/Core/Src/NetPlayServer.h @@ -27,8 +27,6 @@ public: NetPlayServer(const u16 port); ~NetPlayServer(); - void GetPlayerList(std::string& list, std::vector& 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;