Use nullptr where possible instead of NULL or 0
This commit is contained in:
committed by
Jeremy Hayes
parent
728c689574
commit
a7603c132d
@@ -102,7 +102,7 @@ bool InitThread()
|
||||
return false;
|
||||
}
|
||||
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != 0)
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr)
|
||||
return true;
|
||||
|
||||
if (! OS_SetTLSValue(ThreadInitializeIndex, (void *)1)) {
|
||||
@@ -130,8 +130,8 @@ bool DetachThread()
|
||||
//
|
||||
// Function is re-entrant and this thread may not have been initialized.
|
||||
//
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != 0) {
|
||||
if (!OS_SetTLSValue(ThreadInitializeIndex, (void *)0)) {
|
||||
if (OS_GetTLSValue(ThreadInitializeIndex) != nullptr) {
|
||||
if (!OS_SetTLSValue(ThreadInitializeIndex, nullptr)) {
|
||||
assert(0 && "DetachThread(): Unable to clear init flag.");
|
||||
success = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user