clangformat
Some checks are pending
test / ubuntu (push) Waiting to run
test / macos (push) Waiting to run
test / windows (push) Waiting to run

This commit is contained in:
yhirose 2024-11-13 22:50:03 -05:00
parent 9dd565b6e3
commit b1b4bb8850

View file

@ -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;
}