From 505ba833f0aba4315352df59eff3fd935665ad30 Mon Sep 17 00:00:00 2001 From: Fletcher Dunn Date: Mon, 7 Dec 2020 13:28:35 -0800 Subject: [PATCH] Fix compiler warnings --- src/steamnetworkingsockets/steamnetworking_statsutils.h | 2 +- .../steamnetworkingsockets_internal.h | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/steamnetworkingsockets/steamnetworking_statsutils.h b/src/steamnetworkingsockets/steamnetworking_statsutils.h index e41d058..9d94068 100644 --- a/src/steamnetworkingsockets/steamnetworking_statsutils.h +++ b/src/steamnetworkingsockets/steamnetworking_statsutils.h @@ -170,7 +170,7 @@ struct PingTrackerDetailed : PingTracker void ReceivedPing( int nPingMS, SteamNetworkingMicroseconds usecNow ) { PingTracker::ReceivedPing( nPingMS, usecNow ); - m_sample.AddSample( std::min( nPingMS, 0xffff ) ); + m_sample.AddSample( uint16( std::min( nPingMS, 0xffff ) ) ); m_histogram.AddSample( nPingMS ); } diff --git a/src/steamnetworkingsockets/steamnetworkingsockets_internal.h b/src/steamnetworkingsockets/steamnetworkingsockets_internal.h index 1ccf720..e43aba3 100644 --- a/src/steamnetworkingsockets/steamnetworkingsockets_internal.h +++ b/src/steamnetworkingsockets/steamnetworkingsockets_internal.h @@ -225,7 +225,7 @@ const int k_ESteamNetConnectionEnd_InternalRelay_ClientChangedTarget = 9002; /// Timeout value for pings. This basically determines the retry rate for pings. /// If a ping is longer than this, then really, the server should not probably not be /// considered available. -const SteamNetworkingMicroseconds k_usecSteamDatagramClientPingTimeout = 0.750f * k_nMillion; +const SteamNetworkingMicroseconds k_usecSteamDatagramClientPingTimeout = 750000; /// Keepalive interval for currently selected router. We send keepalive pings when /// we haven't heard anything from the router in a while, to see if we need @@ -243,11 +243,11 @@ const SteamNetworkingMicroseconds k_usecSteamDatagramClientBackupRouterKeepalive const SteamNetworkingMicroseconds k_usecSteamDatagramClientServerKeepaliveInterval = 1 * k_nMillion; /// Timeout value for session request messages -const SteamNetworkingMicroseconds k_usecSteamDatagramClientSessionRequestTimeout = 0.750f * k_nMillion; +const SteamNetworkingMicroseconds k_usecSteamDatagramClientSessionRequestTimeout = 750000; /// Router will continue to pend a client ping request for N microseconds, /// hoping for an opportunity to send it inline. -const SteamNetworkingMicroseconds k_usecSteamDatagramRouterPendClientPing = 0.200*k_nMillion; +const SteamNetworkingMicroseconds k_usecSteamDatagramRouterPendClientPing = 200000; /// When serializing a "time since I last sent a packet" value into the packet, /// what precision is used? (A serialized value of 1 = 2^N microseconds.)