| 26 | namespace detail { |
| 27 | |
| 28 | std::codecvt_base::result windows_file_codecvt::do_in( |
| 29 | std::mbstate_t&, |
| 30 | const char* from, const char* from_end, const char*& from_next, |
| 31 | wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const |
| 32 | { |
| 33 | UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; |
| 34 | |
| 35 | int count; |
| 36 | if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from, static_cast< int >(from_end - from), to, static_cast< int >(to_end - to))) == 0) |
| 37 | { |
| 38 | return error; // conversion failed |
| 39 | } |
| 40 | |
| 41 | from_next = from_end; |
| 42 | to_next = to + count; |
| 43 | *to_next = L'\0'; |
| 44 | return ok; |
| 45 | } |
| 46 | |
| 47 | std::codecvt_base::result windows_file_codecvt::do_out( |
| 48 | std::mbstate_t&, |
nothing calls this directly
no outgoing calls
no test coverage detected