| 46 | } |
| 47 | |
| 48 | std::string wchar2string(const wchar_t* wideString) { |
| 49 | if (!wideString) { |
| 50 | return ""; |
| 51 | } |
| 52 | int sizeNeeded = WideCharToMultiByte(CP_UTF8, 0, wideString, -1, nullptr, 0, nullptr, nullptr); |
| 53 | if (sizeNeeded <= 0) { |
| 54 | return ""; |
| 55 | } |
| 56 | std::string ret(sizeNeeded - 1, 0); |
| 57 | WideCharToMultiByte(CP_UTF8, 0, wideString, -1, &ret[0], sizeNeeded, nullptr, nullptr); |
| 58 | return ret; |
| 59 | } |
| 60 | |
| 61 | // FIXME copy from dll |
| 62 | uint64_t get_time() { |
no outgoing calls
no test coverage detected