mirror of
https://github.com/yhirose/cpp-httplib
synced 2024-11-21 06:26:02 -07:00
clangformat
This commit is contained in:
parent
9dd565b6e3
commit
b1b4bb8850
1 changed files with 4 additions and 4 deletions
|
@ -2265,10 +2265,10 @@ std::wstring u8string_to_wstring(const char *s) {
|
|||
auto wlen = ::MultiByteToWideChar(CP_UTF8, 0, s, len, nullptr, 0);
|
||||
if (wlen > 0) {
|
||||
ws.resize(wlen);
|
||||
wlen = ::MultiByteToWideChar(CP_UTF8, 0, s, len, const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(ws.data())), wlen);
|
||||
if (wlen != ws.size()) {
|
||||
ws.clear();
|
||||
}
|
||||
wlen = ::MultiByteToWideChar(
|
||||
CP_UTF8, 0, s, len,
|
||||
const_cast<LPWSTR>(reinterpret_cast<LPCWSTR>(ws.data())), wlen);
|
||||
if (wlen != ws.size()) { ws.clear(); }
|
||||
}
|
||||
return ws;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue