From 473f3db0abba26b21a2f4de98016e540d699a353 Mon Sep 17 00:00:00 2001 From: Shauren Date: Fri, 7 Aug 2020 16:35:42 +0200 Subject: Core/CrashHandler: #ifdef cleanup to make VS not choke when parsing, fixed file being all red in editor (cherry picked from commit 39c5e03b749d44df346b8f37aed3eb898526365a) --- src/common/Debugging/WheatyExceptionReport.cpp | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) (limited to 'src/common/Debugging/WheatyExceptionReport.cpp') diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp index a1d8bb82519..5631287f528 100644 --- a/src/common/Debugging/WheatyExceptionReport.cpp +++ b/src/common/Debugging/WheatyExceptionReport.cpp @@ -3,30 +3,16 @@ // MSDN Magazine, 2002 // FILE: WheatyExceptionReport.CPP //========================================== -#include "CompilerDefs.h" - -#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS && !defined(__MINGW32__) -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#pragma warning(disable:4996) -#pragma warning(disable:4312) -#pragma warning(disable:4311) -#include -#include -#include -#include -#define _NO_CVCONST_H -#include - #include "WheatyExceptionReport.h" - #include "Common.h" #include "Errors.h" #include "GitRevision.h" #include #include #include +#include +#include +#include #define CrashFolder _T("Crashes") #pragma comment(linker, "/DEFAULTLIB:dbghelp.lib") @@ -437,14 +423,14 @@ void WheatyExceptionReport::PrintSystemInfo() ::GlobalMemoryStatus(&MemoryStatus); TCHAR sString[1024]; Log(_T("//=====================================================\r\n")); - if (_GetProcessorName(sString, countof(sString))) + if (_GetProcessorName(sString, std::size(sString))) Log(_T("*** Hardware ***\r\nProcessor: %s\r\nNumber Of Processors: %d\r\nPhysical Memory: %d KB (Available: %d KB)\r\nCommit Charge Limit: %d KB\r\n"), sString, SystemInfo.dwNumberOfProcessors, MemoryStatus.dwTotalPhys/0x400, MemoryStatus.dwAvailPhys/0x400, MemoryStatus.dwTotalPageFile/0x400); else Log(_T("*** Hardware ***\r\nProcessor: \r\nNumber Of Processors: %d\r\nPhysical Memory: %d KB (Available: %d KB)\r\nCommit Charge Limit: %d KB\r\n"), SystemInfo.dwNumberOfProcessors, MemoryStatus.dwTotalPhys/0x400, MemoryStatus.dwAvailPhys/0x400, MemoryStatus.dwTotalPageFile/0x400); - if (_GetWindowsVersion(sString, countof(sString))) + if (_GetWindowsVersion(sString, std::size(sString))) Log(_T("\r\n*** Operation System ***\r\n%s\r\n"), sString); else Log(_T("\r\n*** Operation System:\r\n\r\n")); @@ -1588,5 +1574,3 @@ std::string SymbolDetail::ToString() } return formatted; } - -#endif // _WIN32 -- cgit v1.2.3