Fix compiler warnings

This commit is contained in:
Benau 2018-08-28 01:54:25 +08:00
parent 61e37bc60f
commit 54bac1bf83
2 changed files with 4 additions and 4 deletions

View File

@ -765,7 +765,7 @@ void ServerLobby::startSelection(const Event *event)
}
auto players = m_game_setup->getConnectedPlayers();
const unsigned player_count = players.size();
const unsigned player_count = (unsigned)players.size();
if (NetworkConfig::get()->hasTeamChoosing() && race_manager->teamEnabled())
{
int red_count = 0;

View File

@ -677,7 +677,7 @@ void STKHost::startListening()
void STKHost::stopListening()
{
if (m_exit_timeout.load() == std::numeric_limits<uint64_t>::max())
m_exit_timeout.store(0.0);
m_exit_timeout.store(0);
if (m_listening_thread.joinable())
m_listening_thread.join();
} // stopListening
@ -912,9 +912,9 @@ void STKHost::mainLoop()
if (!is_server)
{
BareNetworkString ping_packet((char*)event.packet->data,
event.packet->dataLength);
(int)event.packet->dataLength);
std::map<uint32_t, uint32_t> peer_pings;
ping_packet.skip(g_ping_packet.size());
ping_packet.skip((int)g_ping_packet.size());
uint64_t server_time = ping_packet.getUInt64();
unsigned peer_size = ping_packet.getUInt8();
for (unsigned i = 0; i < peer_size; i++)