| 446 | } |
| 447 | |
| 448 | int fmt::internal::UTF16ToUTF8::convert(fmt::WStringRef s) { |
| 449 | int length = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, 0, 0, 0, 0); |
| 450 | if (length == 0) |
| 451 | return GetLastError(); |
| 452 | buffer_.resize(length); |
| 453 | length = WideCharToMultiByte( |
| 454 | CP_UTF8, 0, s.c_str(), -1, &buffer_[0], length, 0, 0); |
| 455 | if (length == 0) |
| 456 | return GetLastError(); |
| 457 | return 0; |
| 458 | } |
| 459 | |
| 460 | void fmt::WindowsError::init( |
| 461 | int error_code, StringRef format_str, ArgList args) { |
no test coverage detected