summaryrefslogtreecommitdiff
path: root/src/common/Debugging/WheatyExceptionReport.cpp
diff options
context:
space:
mode:
authorKitzunu <24550914+Kitzunu@users.noreply.github.com>2021-03-02 01:34:20 +0100
committerGitHub <noreply@github.com>2021-03-02 01:34:20 +0100
commit28f1dc5c0cc0d3ce26bb64bfc4475329fb5166c2 (patch)
tree147c9b86f29ae601e37a7dde53570dcac3552b9d /src/common/Debugging/WheatyExceptionReport.cpp
parentdbefa17a534500522a174e9906d8923445c16e79 (diff)
refactor(Core): replace NULL with nullptr (#4593)
Diffstat (limited to 'src/common/Debugging/WheatyExceptionReport.cpp')
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp
index 9b305d26c3..e0fde5d53c 100644
--- a/src/common/Debugging/WheatyExceptionReport.cpp
+++ b/src/common/Debugging/WheatyExceptionReport.cpp
@@ -35,11 +35,11 @@ inline LPTSTR ErrorMessage(DWORD dw)
DWORD formatResult = FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
+ nullptr,
dw,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR) &lpMsgBuf,
- 0, NULL);
+ 0, nullptr);
if (formatResult != 0)
return (LPTSTR)lpMsgBuf;
else
@@ -130,7 +130,7 @@ LONG WINAPI WheatyExceptionReport::WheatyUnhandledExceptionFilter(
TCHAR crash_folder_path[MAX_PATH];
sprintf_s(crash_folder_path, "%s\\%s", module_folder_name, CrashFolder);
- if (!CreateDirectory(crash_folder_path, NULL))
+ if (!CreateDirectory(crash_folder_path, nullptr))
{
if (GetLastError() != ERROR_ALREADY_EXISTS)
return 0;
@@ -220,7 +220,7 @@ BOOL WheatyExceptionReport::_GetProcessorName(TCHAR* sProcessorName, DWORD maxco
return FALSE;
TCHAR szTmp[2048];
DWORD cntBytes = sizeof(szTmp);
- lRet = ::RegQueryValueEx(hKey, _T("ProcessorNameString"), NULL, NULL,
+ lRet = ::RegQueryValueEx(hKey, _T("ProcessorNameString"), nullptr, nullptr,
(LPBYTE)szTmp, &cntBytes);
if (lRet != ERROR_SUCCESS)
return FALSE;
@@ -582,7 +582,7 @@ void WheatyExceptionReport::GenerateExceptionReport(
CONTEXT trashableContext = *pCtx;
- WriteStackDetails(&trashableContext, false, NULL);
+ WriteStackDetails(&trashableContext, false, nullptr);
printTracesForAllThreads(false);
// #ifdef _M_IX86 // X86 Only!
@@ -591,7 +591,7 @@ void WheatyExceptionReport::GenerateExceptionReport(
Log(_T("Local Variables And Parameters\r\n"));
trashableContext = *pCtx;
- WriteStackDetails(&trashableContext, true, NULL);
+ WriteStackDetails(&trashableContext, true, nullptr);
printTracesForAllThreads(true);
SymCleanup(GetCurrentProcess());
@@ -764,7 +764,7 @@ void WheatyExceptionReport::WriteStackDetails(
// Get the next stack frame
if (! StackWalk64(dwMachineType,
m_hProcess,
- pThreadHandle != NULL ? pThreadHandle : GetCurrentThread(),
+ pThreadHandle != nullptr ? pThreadHandle : GetCurrentThread(),
&sf,
pContext,
0,
@@ -969,7 +969,7 @@ void WheatyExceptionReport::DumpTypeIndex(
char buffer[50];
FormatOutputValue(buffer, btStdString, 0, (PVOID)offset, sizeof(buffer));
symbolDetails.top().Value = buffer;
- if (Name != NULL && Name[0] != '\0')
+ if (Name != nullptr && Name[0] != '\0')
symbolDetails.top().Name = Name;
bHandled = true;
return;
@@ -978,7 +978,7 @@ void WheatyExceptionReport::DumpTypeIndex(
char buffer[WER_SMALL_BUFFER_SIZE];
wcstombs(buffer, pwszTypeName, sizeof(buffer));
buffer[WER_SMALL_BUFFER_SIZE - 1] = '\0';
- if (Name != NULL && Name[0] != '\0')
+ if (Name != nullptr && Name[0] != '\0')
{
symbolDetails.top().Type = buffer;
symbolDetails.top().Name = Name;
@@ -988,7 +988,7 @@ void WheatyExceptionReport::DumpTypeIndex(
LocalFree(pwszTypeName);
}
- else if (Name != NULL && Name[0] != '\0')
+ else if (Name != nullptr && Name[0] != '\0')
symbolDetails.top().Name = Name;
if (!StoreSymbol(dwTypeIndex, offset))
@@ -1005,7 +1005,7 @@ void WheatyExceptionReport::DumpTypeIndex(
case SymTagPointerType:
if (SymGetTypeInfo(m_hProcess, modBase, dwTypeIndex, TI_GET_TYPEID, &innerTypeID))
{
- if (Name != NULL && Name[0] != '\0')
+ if (Name != nullptr && Name[0] != '\0')
symbolDetails.top().Name = Name;
BOOL isReference;
@@ -1083,7 +1083,7 @@ void WheatyExceptionReport::DumpTypeIndex(
offset, bHandled, symbolDetails.top().Name.c_str(), "", false, logChildren);
break;
case SymTagPointerType:
- if (Name != NULL && Name[0] != '\0')
+ if (Name != nullptr && Name[0] != '\0')
symbolDetails.top().Name = Name;
DumpTypeIndex(modBase, innerTypeID,
offset, bHandled, symbolDetails.top().Name.c_str(), "", false, logChildren);