Fix some incorrect typing with the NULL->nullptr conversion for Windows
This commit is contained in:
@@ -50,7 +50,7 @@ static const struct ExceptionLookup {
|
|||||||
{ EXCEPTION_INVALID_HANDLE, "Invalid handle" },
|
{ EXCEPTION_INVALID_HANDLE, "Invalid handle" },
|
||||||
{ EXCEPTION_STACK_OVERFLOW, "Stack overflow" },
|
{ EXCEPTION_STACK_OVERFLOW, "Stack overflow" },
|
||||||
{ 0xe06d7363, "Unhandled Microsoft C++ Exception", },
|
{ 0xe06d7363, "Unhandled Microsoft C++ Exception", },
|
||||||
{ nullptr },
|
{ 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const char *LookupException( DWORD code )
|
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.
|
// Trigger the crash handler. This works even in the debugger.
|
||||||
static void NORETURN debug_crash()
|
static void NORETURN debug_crash()
|
||||||
{
|
{
|
||||||
__try {
|
// __try {
|
||||||
|
#if defined(__MSC_VER)
|
||||||
__asm xor ebx,ebx
|
__asm xor ebx,ebx
|
||||||
__asm mov eax,dword ptr [ebx]
|
__asm mov eax,dword ptr [ebx]
|
||||||
// __asm mov dword ptr [ebx],eax
|
// __asm mov dword ptr [ebx],eax
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ NetworkStream_Win32::NetworkStream_Win32():
|
|||||||
{
|
{
|
||||||
m_iPort = -1;
|
m_iPort = -1;
|
||||||
m_State = STATE_IDLE;
|
m_State = STATE_IDLE;
|
||||||
m_Socket = nullptr;
|
m_Socket = NULL;
|
||||||
#if defined(WINDOWS)
|
#if defined(WINDOWS)
|
||||||
m_hResolve = nullptr;
|
m_hResolve = nullptr;
|
||||||
m_hResolveHwnd = nullptr;
|
m_hResolveHwnd = nullptr;
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ bool GetFileVersion( RString sFile, RString &sOut )
|
|||||||
|
|
||||||
RString VersionBuffer( iSize, ' ' );
|
RString VersionBuffer( iSize, ' ' );
|
||||||
// Also VC6:
|
// 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;
|
break;
|
||||||
|
|
||||||
WORD *iTrans;
|
WORD *iTrans;
|
||||||
@@ -146,7 +146,7 @@ bool GetProcessFileName( uint32_t iProcessID, RString &sName )
|
|||||||
|
|
||||||
if( pGetProcessImageFileName != nullptr )
|
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 )
|
if( hProc == nullptr )
|
||||||
{
|
{
|
||||||
sName = werr_ssprintf( GetLastError(), "OpenProcess" );
|
sName = werr_ssprintf( GetLastError(), "OpenProcess" );
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ static RString GetNewWindow()
|
|||||||
{
|
{
|
||||||
HWND h = GetForegroundWindow();
|
HWND h = GetForegroundWindow();
|
||||||
if( h == nullptr )
|
if( h == nullptr )
|
||||||
return "(nullptr)";
|
return "(NULL)";
|
||||||
|
|
||||||
DWORD iProcessID;
|
DWORD iProcessID;
|
||||||
GetWindowThreadProcessId( h, &iProcessID );
|
GetWindowThreadProcessId( h, &iProcessID );
|
||||||
|
|||||||
Reference in New Issue
Block a user