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 {};
|
return {};
|
||||||
}
|
}
|
||||||
const int n =
|
const int n = WideCharToMultiByte(CP_UTF8, 0, w.c_str(), static_cast<int>(w.size()), nullptr, 0, nullptr, nullptr);
|
||||||
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');
|
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);
|
WideCharToMultiByte(CP_UTF8, 0, w.c_str(), static_cast<int>(w.size()), s.data(), n, nullptr, nullptr);
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
Reference in New Issue
Block a user