Reformat all the things. Have fun with merge conflicts.

This commit is contained in:
Pierre Bourdon
2016-06-24 10:43:46 +02:00
parent 2115e8a4a6
commit 3570c7f03a
1116 changed files with 187405 additions and 180344 deletions

View File

@ -13,18 +13,17 @@
// This function might change the error code.
std::string GetLastErrorMsg()
{
const size_t buff_size = 256;
char err_str[buff_size];
const size_t buff_size = 256;
char err_str[buff_size];
#ifdef _WIN32
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
err_str, buff_size, nullptr);
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, nullptr, GetLastError(),
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), err_str, buff_size, nullptr);
#else
// Thread safe (XSI-compliant)
if (strerror_r(errno, err_str, buff_size))
return "";
// Thread safe (XSI-compliant)
if (strerror_r(errno, err_str, buff_size))
return "";
#endif
return std::string(err_str);
return std::string(err_str);
}