| 45 | } |
| 46 | |
| 47 | std::codecvt_base::result windows_file_codecvt::do_out( |
| 48 | std::mbstate_t&, |
| 49 | const wchar_t* from, const wchar_t* from_end, const wchar_t*& from_next, |
| 50 | char* to, char* to_end, char*& to_next) const |
| 51 | { |
| 52 | UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; |
| 53 | |
| 54 | int count; |
| 55 | if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from, static_cast< int >(from_end - from), to, static_cast< int >(to_end - to), 0, 0)) == 0) |
| 56 | { |
| 57 | return error; // conversion failed |
| 58 | } |
| 59 | |
| 60 | from_next = from_end; |
| 61 | to_next = to + count; |
| 62 | *to_next = '\0'; |
| 63 | return ok; |
| 64 | } |
| 65 | |
| 66 | } // namespace detail |
| 67 | } // namespace filesystem |
nothing calls this directly
no outgoing calls
no test coverage detected