Add a static cast. Reported via IRC.

This commit is contained in:
J. Tyne 2012-11-24 20:43:38 +00:00
parent db54e9a5dc
commit a275011f1a

View file

@ -166,8 +166,11 @@ static void check_timeout()
<< "' Time since last ping: " << now - last_ping << "s\n";
// Reset last_ping if we didn't check for the last 10s.
if (last_ping_check + 10 <= now) last_ping = now;
if ((last_ping + network::ping_interval + network::ping_timeout) <= now) {
// This static cast is required on some build systems.
// (Reported in #wesnoth-dev 2012/11/24 21:10:21, log time.)
if ( static_cast<time_t>(last_ping + network::ping_interval + network::ping_timeout)
<= now )
{
time_t timeout = now - last_ping;
ERR_NW << "No server ping since " << timeout
<< " seconds. Connection timed out.\n";