diff --git a/.astylerc b/.astylerc new file mode 100644 index 0000000..a131157 --- /dev/null +++ b/.astylerc @@ -0,0 +1,8 @@ +-t +-j +-y +-c +-k1 +-z2 +-A2 +--pad-header diff --git a/sago/platform_folders.cpp b/sago/platform_folders.cpp index d170d97..c7b1709 100644 --- a/sago/platform_folders.cpp +++ b/sago/platform_folders.cpp @@ -46,8 +46,7 @@ SOFTWARE. // For SHGetFolderPathW and various CSIDL "magic numbers" #include -static std::string win32_utf16_to_utf8(const wchar_t* wstr) -{ +static std::string win32_utf16_to_utf8(const wchar_t* wstr) { std::string res; // If the 6th parameter is 0 then WideCharToMultiByte returns the number of bytes needed to store the result. int actualSize = WideCharToMultiByte(CP_UTF8, 0, wstr, -1, nullptr, 0, nullptr, nullptr); @@ -68,8 +67,7 @@ static std::string win32_utf16_to_utf8(const wchar_t* wstr) static std::string GetWindowsFolder(int folderId, const char* errorMsg) { wchar_t szPath[MAX_PATH]; szPath[0] = 0; - if ( !SUCCEEDED( SHGetFolderPathW( nullptr, folderId, nullptr, 0, szPath ) ) ) - { + if ( !SUCCEEDED( SHGetFolderPathW( nullptr, folderId, nullptr, 0, szPath ) ) ) { throw std::runtime_error(errorMsg); } return win32_utf16_to_utf8(szPath);