Unwrap an over-wrapped line in utf8.hpp to match the codebase style
The WideCharToMultiByte call fits in one line under the 120-column limit (119 cols) -- the form the code it was extracted from used. Comment/whitespace only.
This commit is contained in:
@@ -16,8 +16,7 @@ inline std::string narrow(const std::wstring& w)
|
||||
{
|
||||
return {};
|
||||
}
|
||||
const int n =
|
||||
WideCharToMultiByte(CP_UTF8, 0, w.c_str(), static_cast<int>(w.size()), nullptr, 0, nullptr, nullptr);
|
||||
const int n = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), static_cast<int>(w.size()), nullptr, 0, nullptr, nullptr);
|
||||
std::string s(static_cast<std::size_t>(n), '\0');
|
||||
WideCharToMultiByte(CP_UTF8, 0, w.c_str(), static_cast<int>(w.size()), s.data(), n, nullptr, nullptr);
|
||||
return s;
|
||||
|
||||
Reference in New Issue
Block a user