mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 17:27:36 +01:00
Core: header cleanup, split realmlist, boost compatibility, cotire, remove stormlib/zlib and stormlib/bzip2 and instead use dep sources
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
@brief This file contains definitions of functions used for reporting critical application errors
|
||||
|
||||
It is very important that (std::)abort is NEVER called in place of *((volatile int*)NULL) = 0;
|
||||
It is very important that (std::)abort is NEVER called in place of *((volatile int*)nullptr) = 0;
|
||||
Calling abort() on Windows does not invoke unhandled exception filters - a mechanism used by WheatyExceptionReport
|
||||
to log crashes. exit(1) calls here are for static analysis tools to indicate that calling functions defined in this file
|
||||
terminates the application.
|
||||
@@ -40,7 +40,7 @@ void Assert(char const* file, int line, char const* function, char const* messag
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s ASSERTION FAILED:\n %s\n",
|
||||
file, line, function, message);
|
||||
*((volatile int*)NULL) = 0;
|
||||
*((volatile int*)nullptr) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ void Assert(char const* file, int line, char const* function, char const* messag
|
||||
fflush(stderr);
|
||||
|
||||
va_end(args);
|
||||
*((volatile int*)NULL) = 0;
|
||||
*((volatile int*)nullptr) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ void Fatal(char const* file, int line, char const* function, char const* message
|
||||
fflush(stderr);
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::seconds(10));
|
||||
*((volatile int*)NULL) = 0;
|
||||
*((volatile int*)nullptr) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ void Error(char const* file, int line, char const* function, char const* message
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s ERROR:\n %s\n",
|
||||
file, line, function, message);
|
||||
*((volatile int*)NULL) = 0;
|
||||
*((volatile int*)nullptr) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -92,14 +92,14 @@ void Abort(char const* file, int line, char const* function)
|
||||
{
|
||||
fprintf(stderr, "\n%s:%i in %s ABORTED.\n",
|
||||
file, line, function);
|
||||
*((volatile int*)NULL) = 0;
|
||||
*((volatile int*)nullptr) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
void AbortHandler(int /*sigval*/)
|
||||
{
|
||||
// nothing useful to log here, no way to pass args
|
||||
*((volatile int*)NULL) = 0;
|
||||
*((volatile int*)nullptr) = 0;
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,9 @@
|
||||
#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)
|
||||
@@ -21,6 +23,7 @@
|
||||
|
||||
#include "Common.h"
|
||||
#include "GitRevision.h"
|
||||
#include <algorithm>
|
||||
|
||||
#define CrashFolder _T("Crashes")
|
||||
#pragma comment(linker, "/DEFAULTLIB:dbghelp.lib")
|
||||
@@ -924,7 +927,7 @@ DWORD64 modBase,
|
||||
DWORD dwTypeIndex,
|
||||
DWORD_PTR offset,
|
||||
bool & bHandled,
|
||||
const char* Name,
|
||||
char const* Name,
|
||||
char* /*suffix*/,
|
||||
bool newSymbol,
|
||||
bool logChildren)
|
||||
|
||||
@@ -56,7 +56,7 @@ enum DataKind // Stolen from CVCONS
|
||||
DataIsConstant
|
||||
};
|
||||
|
||||
const char* const rgBaseType[] =
|
||||
char const* const rgBaseType[] =
|
||||
{
|
||||
"<user defined>", // btNoType = 0,
|
||||
"void", // btVoid = 1,
|
||||
@@ -100,7 +100,7 @@ struct SymbolPair
|
||||
_offset = offset;
|
||||
}
|
||||
|
||||
bool operator<(const SymbolPair& other) const
|
||||
bool operator<(SymbolPair const& other) const
|
||||
{
|
||||
return _offset < other._offset ||
|
||||
(_offset == other._offset && _type < other._type);
|
||||
@@ -176,7 +176,7 @@ class WheatyExceptionReport
|
||||
|
||||
static bool FormatSymbolValue(PSYMBOL_INFO, STACKFRAME64 *);
|
||||
|
||||
static void DumpTypeIndex(DWORD64, DWORD, DWORD_PTR, bool &, const char*, char*, bool, bool);
|
||||
static void DumpTypeIndex(DWORD64, DWORD, DWORD_PTR, bool &, char const*, char*, bool, bool);
|
||||
|
||||
static void FormatOutputValue(char * pszCurrBuffer, BasicType basicType, DWORD64 length, PVOID pAddress, size_t bufferSize, size_t countOverride = 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user