newer standards prefer nullptr over NULL - this is most of them but there are others too

This commit is contained in:
DarthArgus
2016-02-15 00:07:31 -06:00
parent 6bb5137dc4
commit 03dc62efba
937 changed files with 14983 additions and 14983 deletions
@@ -28,7 +28,7 @@ unsigned GenericConnection::ms_crcBytes = 0;
GenericConnection::GenericConnection(const char *host, short port, GenericAPICore *apiCore, unsigned reconnectTimeout, unsigned noDataTimeoutSecs, unsigned noAckTimeoutSecs, unsigned incomingBufSizeInKB, unsigned outgoingBufSizeInKB, unsigned keepAlive, unsigned maxRecvMessageSizeInKB, unsigned holdTime)
: m_bConnected(false),
m_apiCore(apiCore),
m_con(NULL),
m_con(nullptr),
m_host(host),
m_nextHost(host),
m_port(port),
@@ -72,8 +72,8 @@ GenericConnection::~GenericConnection()
{
if(m_con)
{
m_con->SetHandler(NULL);
m_con->Disconnect();//don't worry about onterminated being called, we've set it's handler to null, so it wont
m_con->SetHandler(nullptr);
m_con->Disconnect();//don't worry about onterminated being called, we've set it's handler to nullptr, so it wont
m_con->Release();
}
@@ -96,7 +96,7 @@ void GenericConnection::disconnect()
{
m_con->Disconnect();
//no need to release, since callback to onTerminated releases it, and callback is allways made m_con->Release();
m_con = NULL;
m_con = nullptr;
}
m_conState = CON_DISCONNECT;
m_bConnected = false;
@@ -112,7 +112,7 @@ void GenericConnection::OnTerminated(UdpConnection *con)
if(m_con)
{
m_con->Release();
m_con = NULL;
m_con = nullptr;
}
m_conState = CON_DISCONNECT;
m_bConnected = false;
@@ -146,7 +146,7 @@ void GenericConnection::OnRoutePacket(UdpConnection *con, const unsigned char *d
get(iter, type);
get(iter, track);
#endif
GenericResponse *res = NULL;
GenericResponse *res = nullptr;
// the following if block is a temporary fix that prevents
// a crash with a game team in which they occasionally find
@@ -208,7 +208,7 @@ void GenericConnection::process(bool giveTime)
{
m_con->SetHandler(this);
m_conState = CON_NEGOTIATE;
m_conTimeout = time(NULL) + m_reconnectTimeout;
m_conTimeout = time(nullptr) + m_reconnectTimeout;
}
break;
case CON_NEGOTIATE:
@@ -225,12 +225,12 @@ void GenericConnection::process(bool giveTime)
m_apiCore->OnConnect(m_host.c_str(), m_port);
m_bConnected = true;
}
else if(time(NULL) > m_conTimeout)
else if(time(nullptr) > m_conTimeout)
{
// we did not connect
m_con->Disconnect();
//no need to release, since callback to onTerminated releases it, and callback is allways made m_con->Release();
m_con = NULL;
m_con = nullptr;
m_conState = CON_DISCONNECT;
m_bConnected = false;
}
@@ -246,7 +246,7 @@ void GenericConnection::process(bool giveTime)
{
m_con->Disconnect();
//no need to release, since callback to onTerminated releases it, and callback is allways made m_con->Release();
m_con = NULL;
m_con = nullptr;
}
}