diff options
author | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2020-08-14 17:06:03 +0200 |
commit | 1c52d5fff738aa01bd27fd117076ac33515acef5 (patch) | |
tree | ff7d2113e023a0fd47fbdde8ea94c0fe4bb9a804 /src/common/Debugging/Errors.cpp | |
parent | 02fd3a1f15840203d8515dae12920d9b66655076 (diff) |
Core/Misc: Replace NULL with nullptr
Diffstat (limited to 'src/common/Debugging/Errors.cpp')
-rw-r--r-- | src/common/Debugging/Errors.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index 27828da775a..01bee703e80 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -27,7 +27,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. @@ -39,7 +39,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); } @@ -54,7 +54,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); } @@ -69,7 +69,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); } @@ -77,7 +77,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); } @@ -91,14 +91,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); } |