mirror of
https://github.com/citra-emu/citra.git
synced 2024-11-25 13:40:14 +00:00
Update string_util.cpp
Careless
This commit is contained in:
parent
4cd902da5e
commit
1645eee8f4
@ -296,7 +296,7 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st
|
|||||||
|
|
||||||
std::string UTF16ToUTF8(const std::u16string& input)
|
std::string UTF16ToUTF8(const std::u16string& input)
|
||||||
{
|
{
|
||||||
#if _MSC_VER >= 1900 && defined(__MINGW64__)
|
#if _MSC_VER >= 1900 || defined(__MINGW64__)
|
||||||
// Workaround for missing char16_t/char32_t instantiations in MSVC2015
|
// Workaround for missing char16_t/char32_t instantiations in MSVC2015
|
||||||
std::wstring_convert<std::codecvt_utf8_utf16<__int16>, __int16> convert;
|
std::wstring_convert<std::codecvt_utf8_utf16<__int16>, __int16> convert;
|
||||||
std::basic_string<__int16> tmp_buffer(input.cbegin(), input.cend());
|
std::basic_string<__int16> tmp_buffer(input.cbegin(), input.cend());
|
||||||
@ -309,7 +309,7 @@ std::string UTF16ToUTF8(const std::u16string& input)
|
|||||||
|
|
||||||
std::u16string UTF8ToUTF16(const std::string& input)
|
std::u16string UTF8ToUTF16(const std::string& input)
|
||||||
{
|
{
|
||||||
#if _MSC_VER >= 1900 && defined(__MINGW64__)
|
#if _MSC_VER >= 1900 || defined(__MINGW64__)
|
||||||
// Workaround for missing char16_t/char32_t instantiations in MSVC2015
|
// Workaround for missing char16_t/char32_t instantiations in MSVC2015
|
||||||
std::wstring_convert<std::codecvt_utf8_utf16<__int16>, __int16> convert;
|
std::wstring_convert<std::codecvt_utf8_utf16<__int16>, __int16> convert;
|
||||||
auto tmp_buffer = convert.from_bytes(input);
|
auto tmp_buffer = convert.from_bytes(input);
|
||||||
|
Loading…
Reference in New Issue
Block a user