You've already forked cpp-httplib
clangformat
This commit is contained in:
@ -2265,10 +2265,10 @@ std::wstring u8string_to_wstring(const char *s) {
|
|||||||
auto wlen = ::MultiByteToWideChar(CP_UTF8, 0, s, len, nullptr, 0);
|
auto wlen = ::MultiByteToWideChar(CP_UTF8, 0, s, len, nullptr, 0);
|
||||||
if (wlen > 0) {
|
if (wlen > 0) {
|
||||||
ws.resize(wlen);
|
ws.resize(wlen);
|
||||||
wlen = ::MultiByteToWideChar(CP_UTF8, 0, s, len, const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(ws.data())), wlen);
|
wlen = ::MultiByteToWideChar(
|
||||||
if (wlen != ws.size()) {
|
CP_UTF8, 0, s, len,
|
||||||
ws.clear();
|
const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(ws.data())), wlen);
|
||||||
}
|
if (wlen != ws.size()) { ws.clear(); }
|
||||||
}
|
}
|
||||||
return ws;
|
return ws;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user