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 // close listening socket and client sockets
{ for (auto& player_entry : m_players)
std::map<sf::SocketTCP, Client>::reverse_iterator player_entry.second.socket.Close();
i = m_players.rbegin(),
e = m_players.rend();
for ( ; i!=e; ++i)
i->second.socket.Close();
}
return;
} }
// called from ---NETPLAY--- thread // called from ---NETPLAY--- thread