core: Fix clang-tidy modernize-use-nullptr warnings
This commit is contained in:
@@ -52,17 +52,17 @@ BreakpointFallback()
|
||||
#else
|
||||
|
||||
void
|
||||
BreakpointFallback(void)
|
||||
BreakpointFallback()
|
||||
{
|
||||
NS_LOG_FUNCTION_NOARGS();
|
||||
|
||||
int* a = 0;
|
||||
int* a = nullptr;
|
||||
/**
|
||||
* we test here to allow a debugger to change the value of
|
||||
* the variable 'a' to allow the debugger to avoid the
|
||||
* subsequent segfault.
|
||||
*/
|
||||
if (a == 0)
|
||||
if (a == nullptr)
|
||||
{
|
||||
*a = 0;
|
||||
}
|
||||
|
||||
@@ -186,13 +186,13 @@ FindSelfDirectory()
|
||||
// LPTSTR = char *
|
||||
DWORD size = 1024;
|
||||
LPTSTR lpFilename = (LPTSTR)malloc(sizeof(TCHAR) * size);
|
||||
DWORD status = GetModuleFileName(0, lpFilename, size);
|
||||
DWORD status = GetModuleFileName(nullptr, lpFilename, size);
|
||||
while (status == size)
|
||||
{
|
||||
size = size * 2;
|
||||
free(lpFilename);
|
||||
lpFilename = (LPTSTR)malloc(sizeof(TCHAR) * size);
|
||||
status = GetModuleFileName(0, lpFilename, size);
|
||||
status = GetModuleFileName(nullptr, lpFilename, size);
|
||||
}
|
||||
NS_ASSERT(status != 0);
|
||||
filename = lpFilename;
|
||||
|
||||
Reference in New Issue
Block a user