Fix some incorrect typing with the NULL->nullptr conversion for Windows

This commit is contained in:
teejusb
2019-06-22 23:16:10 -07:00
parent f230d39634
commit f08d7d9f68
4 changed files with 7 additions and 6 deletions
+3 -2
View File
@@ -50,7 +50,7 @@ static const struct ExceptionLookup {
{ EXCEPTION_INVALID_HANDLE, "Invalid handle" },
{ EXCEPTION_STACK_OVERFLOW, "Stack overflow" },
{ 0xe06d7363, "Unhandled Microsoft C++ Exception", },
{ nullptr },
{ 0 },
};
static const char *LookupException( DWORD code )
@@ -540,7 +540,8 @@ void CrashHandler::do_backtrace( const void **buf, size_t size,
// Trigger the crash handler. This works even in the debugger.
static void NORETURN debug_crash()
{
__try {
// __try {
#if defined(__MSC_VER)
__asm xor ebx,ebx
__asm mov eax,dword ptr [ebx]
// __asm mov dword ptr [ebx],eax
@@ -170,7 +170,7 @@ NetworkStream_Win32::NetworkStream_Win32():
{
m_iPort = -1;
m_State = STATE_IDLE;
m_Socket = nullptr;
m_Socket = NULL;
#if defined(WINDOWS)
m_hResolve = nullptr;
m_hResolveHwnd = nullptr;
+2 -2
View File
@@ -22,7 +22,7 @@ bool GetFileVersion( RString sFile, RString &sOut )
RString VersionBuffer( iSize, ' ' );
// Also VC6:
if( !GetFileVersionInfo( const_cast<char *>(sFile.c_str()), nullptr, iSize, const_cast<char *>(VersionBuffer.c_str()) ) )
if( !GetFileVersionInfo( const_cast<char *>(sFile.c_str()), 0, iSize, const_cast<char *>(VersionBuffer.c_str()) ) )
break;
WORD *iTrans;
@@ -146,7 +146,7 @@ bool GetProcessFileName( uint32_t iProcessID, RString &sName )
if( pGetProcessImageFileName != nullptr )
{
HANDLE hProc = OpenProcess( PROCESS_VM_READ|PROCESS_QUERY_INFORMATION, nullptr, iProcessID );
HANDLE hProc = OpenProcess( PROCESS_VM_READ|PROCESS_QUERY_INFORMATION, FALSE, iProcessID );
if( hProc == nullptr )
{
sName = werr_ssprintf( GetLastError(), "OpenProcess" );
+1 -1
View File
@@ -37,7 +37,7 @@ static RString GetNewWindow()
{
HWND h = GetForegroundWindow();
if( h == nullptr )
return "(nullptr)";
return "(NULL)";
DWORD iProcessID;
GetWindowThreadProcessId( h, &iProcessID );