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:
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user