From 1a5dd4140755b3e26bb11aaea365108114dca68e Mon Sep 17 00:00:00 2001 From: Lynix Date: Sun, 17 Apr 2016 17:55:21 +0200 Subject: [PATCH] Network/RUdpConnection: Remove useless arg from Listen Former-commit-id: 94af162bf5fc1e7d06baae8e4121eb5afe10a649 --- include/Nazara/Network/RUdpConnection.hpp | 4 ++-- include/Nazara/Network/RUdpConnection.inl | 4 ++-- src/Nazara/Network/RUdpConnection.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/Nazara/Network/RUdpConnection.hpp b/include/Nazara/Network/RUdpConnection.hpp index 2896ec6ce..b583bdf49 100644 --- a/include/Nazara/Network/RUdpConnection.hpp +++ b/include/Nazara/Network/RUdpConnection.hpp @@ -46,8 +46,8 @@ namespace Nz inline UInt16 GetBoundPort() const; inline SocketError GetLastError() const; - inline bool Listen(NetProtocol protocol, UInt16 port = 64266, unsigned int queueSize = 10); - bool Listen(const IpAddress& address, unsigned int queueSize = 10); + inline bool Listen(NetProtocol protocol, UInt16 port = 64266); + bool Listen(const IpAddress& address); bool PollMessage(RUdpMessage* message); diff --git a/include/Nazara/Network/RUdpConnection.inl b/include/Nazara/Network/RUdpConnection.inl index cfb598bb9..da63536c9 100644 --- a/include/Nazara/Network/RUdpConnection.inl +++ b/include/Nazara/Network/RUdpConnection.inl @@ -33,7 +33,7 @@ namespace Nz return m_lastError; } - inline bool RUdpConnection::Listen(NetProtocol protocol, UInt16 port, unsigned int queueSize) + inline bool RUdpConnection::Listen(NetProtocol protocol, UInt16 port) { NazaraAssert(protocol != NetProtocol_Any, "Any protocol not supported for Listen"); //< TODO NazaraAssert(protocol != NetProtocol_Unknown, "Invalid protocol"); @@ -56,7 +56,7 @@ namespace Nz } any.SetPort(port); - return Listen(any, queueSize); + return Listen(any); } inline void RUdpConnection::SetProtocolId(UInt32 protocolId) diff --git a/src/Nazara/Network/RUdpConnection.cpp b/src/Nazara/Network/RUdpConnection.cpp index f8b57cf00..8d2bc5e32 100644 --- a/src/Nazara/Network/RUdpConnection.cpp +++ b/src/Nazara/Network/RUdpConnection.cpp @@ -63,7 +63,7 @@ namespace Nz return Connect(hostnameAddress); } - bool RUdpConnection::Listen(const IpAddress& address, unsigned int queueSize) + bool RUdpConnection::Listen(const IpAddress& address) { if (!InitSocket(address.GetProtocol())) return false; @@ -110,7 +110,7 @@ namespace Nz { PeerData& peer = m_peers[m_peerIterator]; - UInt32 timeSinceLastPacket = m_currentTime - peer.lastPacketTime; + UInt32 timeSinceLastPacket = static_cast(m_currentTime - peer.lastPacketTime); if (timeSinceLastPacket > m_timeBeforeTimeOut) { DisconnectPeer(peer.index);