2
3
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-14 02:27:40 -04:00

Re-define nil as nullptr, cleaning up some potential issues along the way

This commit is contained in:
2013-01-20 20:48:41 -08:00
parent c65ac61fb8
commit f86b549293
36 changed files with 123 additions and 130 deletions

View File

@ -1719,15 +1719,15 @@ void CliAuConn::StopAutoPing () {
void CliAuConn::TimerPing () {
// Send a ping request
pingSendTimeMs = GetNonZeroTimeMs();
const uintptr_t msg[] = {
kCli2Auth_PingRequest,
pingSendTimeMs,
0, // not a transaction
0, // no payload
nil
reinterpret_cast<uintptr_t>(nullptr)
};
Send(msg, arrsize(msg));
}
@ -5093,8 +5093,7 @@ bool AuthQueryConnected () {
bool result;
s_critsect.Enter();
{
if (nil != (result = s_active))
result &= (nil != s_active->cli);
result = (s_active && s_active->cli);
}
s_critsect.Leave();
return result;

View File

@ -756,8 +756,7 @@ bool GameQueryConnected () {
bool result;
s_critsect.Enter();
{
if (nil != (result = s_active))
result &= (nil != s_active->cli);
result = (s_active && s_active->cli);
}
s_critsect.Leave();
return result;

View File

@ -655,15 +655,15 @@ void CliGkConn::StopAutoPing () {
void CliGkConn::TimerPing () {
// Send a ping request
pingSendTimeMs = GetNonZeroTimeMs();
const uintptr_t msg[] = {
kCli2GateKeeper_PingRequest,
pingSendTimeMs,
0, // not a transaction
0, // no payload
nil
reinterpret_cast<uintptr_t>(nullptr)
};
Send(msg, arrsize(msg));
}
@ -1032,8 +1032,7 @@ bool GateKeeperQueryConnected () {
bool result;
s_critsect.Enter();
{
if (nil != (result = s_active))
result &= (nil != s_active->cli);
result = (s_active && s_active->cli);
}
s_critsect.Leave();
return result;