diff options
Diffstat (limited to 'src/shared/error_report.cpp')
| -rw-r--r-- | src/shared/error_report.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/shared/error_report.cpp b/src/shared/error_report.cpp index 02ff2d56..c9277c1b 100644 --- a/src/shared/error_report.cpp +++ b/src/shared/error_report.cpp @@ -35,7 +35,7 @@ void reportError(LPCSTR format, ...) vsnprintf(buffer, 1024, format, argList);
va_end(argList);
- MessageBoxA(NULL, buffer, "Error", MB_OK | MB_ICONERROR);
+ MessageBoxA(nullptr, buffer, "Error", MB_OK | MB_ICONERROR);
}
void reportError(LPCWSTR format, ...)
@@ -50,18 +50,18 @@ void reportError(LPCWSTR format, ...) _vsnwprintf(buffer, 1024, format, argList);
va_end(argList);
- MessageBoxW(NULL, buffer, L"Error", MB_OK | MB_ICONERROR);
+ MessageBoxW(nullptr, buffer, L"Error", MB_OK | MB_ICONERROR);
}
std::string getCurrentErrorStringA()
{
- LPSTR buffer = NULL;
+ LPSTR buffer = nullptr;
DWORD errorCode = ::GetLastError();
if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buffer, 0, NULL) == 0) {
+ nullptr, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buffer, 0, nullptr) == 0) {
::SetLastError(errorCode);
return std::string();
} else {
@@ -78,12 +78,12 @@ std::string getCurrentErrorStringA() std::wstring getCurrentErrorStringW()
{
- LPWSTR buffer = NULL;
+ LPWSTR buffer = nullptr;
DWORD errorCode = ::GetLastError();
if (FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
- NULL, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&buffer, 0, NULL) == 0) {
+ nullptr, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&buffer, 0, nullptr) == 0) {
::SetLastError(errorCode);
return std::wstring();
} else {
|
