Use nullptr where possible instead of NULL or 0

This commit is contained in:
Johannes Kauffmann 2022-11-22 19:09:31 +01:00 committed by Jeremy Hayes
parent 728c689574
commit a7603c132d
38 changed files with 248 additions and 248 deletions

View file

@ -76,7 +76,7 @@ OS_TLSIndex OS_AllocTLSIndex()
//
// Create global pool key.
//
if ((pthread_key_create(&pPoolIndex, NULL)) != 0) {
if ((pthread_key_create(&pPoolIndex, nullptr)) != 0) {
assert(0 && "OS_AllocTLSIndex(): Unable to allocate Thread Local Storage");
return OS_INVALID_TLS_INDEX;
}

View file

@ -113,7 +113,7 @@ HANDLE GlobalLock;
void InitGlobalLock()
{
GlobalLock = CreateMutex(0, false, 0);
GlobalLock = CreateMutex(nullptr, false, nullptr);
}
void GetGlobalLock()
@ -128,7 +128,7 @@ void ReleaseGlobalLock()
unsigned int __stdcall EnterGenericThread (void* entry)
{
return ((TThreadEntrypoint)entry)(0);
return ((TThreadEntrypoint)entry)(nullptr);
}
//#define DUMP_COUNTERS

View file

@ -41,7 +41,7 @@ namespace glslang {
// Thread Local Storage Operations
//
typedef void* OS_TLSIndex;
#define OS_INVALID_TLS_INDEX ((void*)0)
#define OS_INVALID_TLS_INDEX nullptr
OS_TLSIndex OS_AllocTLSIndex();
bool OS_SetTLSValue(OS_TLSIndex nIndex, void *lpvValue);