Fix MSVC build.

This commit is contained in:
Victor Zverovich 2014-04-30 11:47:16 -07:00
parent 89a8aaf502
commit c7eba007cc

View File

@ -292,9 +292,9 @@ std::string GetTestErrorMessage() {
FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0, FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, 0,
ERROR_FILE_EXISTS, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), ERROR_FILE_EXISTS, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
reinterpret_cast<LPWSTR>(&message), 0, 0); reinterpret_cast<LPWSTR>(&message), 0, 0);
ampl::UTF16ToUTF8 utf8_message(message); fmt::internal::UTF16ToUTF8 utf8_message(message);
LocalFree(message); LocalFree(message);
return std::string(utf8_message); return fmt::str(utf8_message);
} }
#endif #endif