summaryrefslogtreecommitdiff
path: root/src/shared/windows_error.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2015-03-09 12:34:34 +0100
committerTannin <devnull@localhost>2015-03-09 12:34:34 +0100
commit7a1ae9b0f1560c9eda32e032796fbb3fd56ff236 (patch)
treedea71435ac1042cb008fcd9f7b1ec57e6ea91227 /src/shared/windows_error.cpp
parentd45ebf134819e1559718681becca9c4139fb7151 (diff)
parentdb2954e8eb41da715b9e7d79a72e225797401413 (diff)
Merge with branch1.2
Diffstat (limited to 'src/shared/windows_error.cpp')
-rw-r--r--src/shared/windows_error.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/windows_error.cpp b/src/shared/windows_error.cpp
index 647a5bfb..97a58a20 100644
--- a/src/shared/windows_error.cpp
+++ b/src/shared/windows_error.cpp
@@ -27,13 +27,13 @@ std::string windows_error::constructMessage(const std::string& input, int inErro
std::ostringstream finalMessage;
finalMessage << input;
- LPSTR buffer = NULL;
+ LPSTR buffer = nullptr;
DWORD errorCode = inErrorCode != -1 ? inErrorCode : ::GetLastError();
// TODO: the message is not english?
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) {
finalMessage << " (errorcode " << errorCode << ")";
} else {
LPSTR lastChar = buffer + strlen(buffer) - 2;