aboutsummaryrefslogtreecommitdiff
path: root/src/common/Debugging
diff options
context:
space:
mode:
authorariel- <ariel-@users.noreply.github.com>2017-06-19 23:20:06 -0300
committerariel- <ariel-@users.noreply.github.com>2017-06-19 23:20:06 -0300
commit85a7d5ce9ac68b30da2277cc91d4b70358f1880d (patch)
treedf3d2084ee2e35008903c03178039b9c986e2d08 /src/common/Debugging
parent052fc24315ace866ea1cf610e85df119b68100c9 (diff)
Core: ported headers cleanup from master branch
Diffstat (limited to 'src/common/Debugging')
-rw-r--r--src/common/Debugging/Errors.cpp12
-rw-r--r--src/common/Debugging/WheatyExceptionReport.cpp5
-rw-r--r--src/common/Debugging/WheatyExceptionReport.h6
3 files changed, 13 insertions, 10 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp
index 2e67f3bf539..4b56f43b067 100644
--- a/src/common/Debugging/Errors.cpp
+++ b/src/common/Debugging/Errors.cpp
@@ -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);
}
diff --git a/src/common/Debugging/WheatyExceptionReport.cpp b/src/common/Debugging/WheatyExceptionReport.cpp
index 5585dd25c13..5b6e9e76ebc 100644
--- a/src/common/Debugging/WheatyExceptionReport.cpp
+++ b/src/common/Debugging/WheatyExceptionReport.cpp
@@ -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")
@@ -915,7 +918,7 @@ DWORD64 modBase,
DWORD dwTypeIndex,
DWORD_PTR offset,
bool & bHandled,
-const char* Name,
+char const* Name,
char* /*suffix*/,
bool newSymbol,
bool logChildren)
diff --git a/src/common/Debugging/WheatyExceptionReport.h b/src/common/Debugging/WheatyExceptionReport.h
index 91c2ae93179..2fee14708f2 100644
--- a/src/common/Debugging/WheatyExceptionReport.h
+++ b/src/common/Debugging/WheatyExceptionReport.h
@@ -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);
@@ -174,7 +174,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);