Fix assert error.

This commit is contained in:
Jonathan Naylor 2016-04-04 17:00:59 +01:00
parent 9d03c83609
commit 5c6e0ea4c1
2 changed files with 2 additions and 19 deletions

View File

@ -33,7 +33,6 @@ m_port(port),
m_fd(-1)
{
assert(!address.empty());
assert(port > 0U);
#if defined(_WIN32) || defined(_WIN64)
WSAData data;
@ -47,21 +46,6 @@ CUDPSocket::CUDPSocket(unsigned int port) :
m_address(),
m_port(port),
m_fd(-1)
{
assert(port > 0U);
#if defined(_WIN32) || defined(_WIN64)
WSAData data;
int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data);
if (wsaRet != 0)
LogError("Error from WSAStartup");
#endif
}
CUDPSocket::CUDPSocket() :
m_address(),
m_port(0U),
m_fd(-1)
{
#if defined(_WIN32) || defined(_WIN64)
WSAData data;

View File

@ -36,9 +36,8 @@
class CUDPSocket {
public:
CUDPSocket(const std::string& address, unsigned int port);
CUDPSocket(unsigned int port);
CUDPSocket();
CUDPSocket(const std::string& address, unsigned int port = 0U);
CUDPSocket(unsigned int port = 0U);
~CUDPSocket();
bool open();