diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2015-07-15 22:08:33 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2015-07-15 22:08:33 +0300 |
commit | 01c1146276f7319843c357480c4374fe555f07c5 (patch) | |
tree | ca04e44b03b126de4ad3071e3e70df3982f9f174 /utils/libservice/src/windows_error.cpp | |
parent | README updates (diff) | |
download | windows7-drivers-01c1146276f7319843c357480c4374fe555f07c5.tar.gz windows7-drivers-01c1146276f7319843c357480c4374fe555f07c5.zip |
utils: code style
Diffstat (limited to 'utils/libservice/src/windows_error.cpp')
-rw-r--r-- | utils/libservice/src/windows_error.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/utils/libservice/src/windows_error.cpp b/utils/libservice/src/windows_error.cpp index 1e28345..2a54366 100644 --- a/utils/libservice/src/windows_error.cpp +++ b/utils/libservice/src/windows_error.cpp @@ -6,7 +6,7 @@ * See LICENSE.txt for details. */ -#include "libservice/windows_error.hpp" +#include "libservice/all.hpp" #include <Windows.h> @@ -14,14 +14,14 @@ namespace libservice { - std::string WinErrorCategory::message(int code) const + std::string WindowsErrorCategory::message(int code) const { char* buf_ptr; - DWORD written = FormatMessageA( + const auto nbwritten = FormatMessageA( FORMAT_MESSAGE_ALLOCATE_BUFFER - | FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, + | FORMAT_MESSAGE_FROM_SYSTEM + | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), @@ -29,13 +29,13 @@ namespace libservice 0, NULL); - if (0 == written) + if (0 == nbwritten) { LocalFree(buf_ptr); return "Couldn't format error message"; } - std::string str(buf_ptr, written - 2); + std::string str(buf_ptr, nbwritten - 2); LocalFree(buf_ptr); return str; } |