summaryrefslogtreecommitdiff
path: root/src/shared/error_report.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-11-28 11:19:20 +0100
committerTannin <devnull@localhost>2014-11-28 11:19:20 +0100
commit99de80e7224f2491fb7518e32f195ad6a912b624 (patch)
treeef8f1d3ba16b7681beaae5cf67d0f5671e486061 /src/shared/error_report.cpp
parent78f628e0af2f2df562c40ac1424b432b6a969055 (diff)
replaced all uses of NULL with nullptr
fixed a few placed where NULL was used as a number or boolean
Diffstat (limited to 'src/shared/error_report.cpp')
-rw-r--r--src/shared/error_report.cpp12
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 {