Compress a for loop in NetPlayServer.

Also gets rid of a redundant return from a void function.
This commit is contained in:
Lioncash 2014-05-29 20:30:03 -04:00
parent a3ae20fc15
commit 7babc635cb

View File

@ -114,15 +114,8 @@ void NetPlayServer::ThreadFunc()
}
// close listening socket and client sockets
{
std::map<sf::SocketTCP, Client>::reverse_iterator
i = m_players.rbegin(),
e = m_players.rend();
for ( ; i!=e; ++i)
i->second.socket.Close();
}
return;
for (auto& player_entry : m_players)
player_entry.second.socket.Close();
}
// called from ---NETPLAY--- thread