@@ -120,7 +120,7 @@ void NetworkManager::ScheduleServerThread(std::function<void()> func) {
120120 g_server_queue_mutex.unlock ();
121121}
122122
123- std::vector<Client *> NetworkManager::GetPlayerByName (std::string name)
123+ std::vector<Client *> NetworkManager::GetPlayerByName (const std::string name)
124124{
125125 std::vector<Client *> matches;
126126 for (auto &client : this ->clients ) {
@@ -132,7 +132,7 @@ std::vector<Client *> NetworkManager::GetPlayerByName(std::string name)
132132 return matches;
133133}
134134
135- Client* NetworkManager::GetClientByID (sf::Uint32 ID )
135+ Client* NetworkManager::GetClientByID (const sf::Uint32 ID )
136136{
137137 for (auto & client : this ->clients ) {
138138 if (client.ID == ID ) {
@@ -143,7 +143,7 @@ Client* NetworkManager::GetClientByID(sf::Uint32 ID)
143143 return nullptr ;
144144}
145145
146- std::vector<Client *> NetworkManager::GetClientByIP (sf::IpAddress ip) {
146+ std::vector<Client *> NetworkManager::GetClientByIP (const sf::IpAddress ip) {
147147 std::vector<Client *> clients;
148148 for (auto & client : this ->clients ) {
149149 if (client.IP == ip) {
@@ -214,7 +214,7 @@ void NetworkManager::StopServer()
214214 GHOST_LOG (" Server stopped!" );
215215}
216216
217- void NetworkManager::DisconnectPlayer (Client& c, const char * reason)
217+ void NetworkManager::DisconnectPlayer (Client& c, const std::string reason)
218218{
219219 sf::Packet packet;
220220 packet << HEADER ::DISCONNECT << c.ID ;
0 commit comments