From d13f6bb870cdda71257f665367be8ef9fca86255 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Tue, 17 May 2022 11:47:01 +0200 Subject: Apply clang-format. --- src/shared/windows_error.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/shared/windows_error.cpp') diff --git a/src/shared/windows_error.cpp b/src/shared/windows_error.cpp index 49fb9bc7..f0add1da 100644 --- a/src/shared/windows_error.cpp +++ b/src/shared/windows_error.cpp @@ -20,7 +20,8 @@ along with Mod Organizer. If not, see . #include "windows_error.h" #include -namespace MOShared { +namespace MOShared +{ std::string windows_error::constructMessage(const std::string& input, int inErrorCode) { @@ -33,17 +34,19 @@ std::string windows_error::constructMessage(const std::string& input, int inErro // TODO: the message is not english? if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - nullptr, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPSTR)&buffer, 0, nullptr) == 0) { + nullptr, errorCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPSTR)&buffer, 0, nullptr) == 0) { finalMessage << " (errorcode " << errorCode << ")"; } else { LPSTR lastChar = buffer + strlen(buffer) - 2; - *lastChar = '\0'; + *lastChar = '\0'; finalMessage << " (" << buffer << " [" << errorCode << "])"; - LocalFree(buffer); // allocated by FormatMessage + LocalFree(buffer); // allocated by FormatMessage } - ::SetLastError(errorCode); // restore error code because FormatMessage might have modified it + ::SetLastError( + errorCode); // restore error code because FormatMessage might have modified it return finalMessage.str(); } -} // namespace MOShared +} // namespace MOShared -- cgit v1.3.1