| 64 | const std::wstring wdummy; |
| 65 | |
| 66 | static std::wstring Utf8ToWide(const char *in) { |
| 67 | if (nullptr == in) { |
| 68 | return wdummy; |
| 69 | } |
| 70 | int size = MultiByteToWideChar(CP_UTF8, 0, in, -1, nullptr, 0); |
| 71 | // size includes terminating null; std::wstring adds null automatically |
| 72 | std::wstring out(static_cast<size_t>(size) - 1, L'\0'); |
| 73 | MultiByteToWideChar(CP_UTF8, 0, in, -1, &out[0], size); |
| 74 | |
| 75 | return out; |
| 76 | } |
| 77 | |
| 78 | const std::string dummy; |
| 79 |
no outgoing calls
no test coverage detected