summaryrefslogtreecommitdiffstats
path: root/src/common/string_util.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2021-02-08 08:55:43 +0100
committerMorph <39850852+Morph1984@users.noreply.github.com>2021-02-08 08:56:07 +0100
commitff58ad205040bc83bd68197184677055e3e2a313 (patch)
tree2ffe2636170f954878334b98bc60accb41ca83db /src/common/string_util.cpp
parentMerge pull request #5339 from german77/interactive (diff)
downloadyuzu-ff58ad205040bc83bd68197184677055e3e2a313.tar
yuzu-ff58ad205040bc83bd68197184677055e3e2a313.tar.gz
yuzu-ff58ad205040bc83bd68197184677055e3e2a313.tar.bz2
yuzu-ff58ad205040bc83bd68197184677055e3e2a313.tar.lz
yuzu-ff58ad205040bc83bd68197184677055e3e2a313.tar.xz
yuzu-ff58ad205040bc83bd68197184677055e3e2a313.tar.zst
yuzu-ff58ad205040bc83bd68197184677055e3e2a313.zip
Diffstat (limited to '')
-rw-r--r--src/common/string_util.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp
index 4cba2aaa4..7b614ad89 100644
--- a/src/common/string_util.cpp
+++ b/src/common/string_util.cpp
@@ -141,27 +141,13 @@ std::string ReplaceAll(std::string result, const std::string& src, const std::st
}
std::string UTF16ToUTF8(const std::u16string& input) {
-#ifdef _MSC_VER
- // Workaround for missing char16_t/char32_t instantiations in MSVC2017
- std::wstring_convert<std::codecvt_utf8_utf16<__int16>, __int16> convert;
- std::basic_string<__int16> tmp_buffer(input.cbegin(), input.cend());
- return convert.to_bytes(tmp_buffer);
-#else
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> convert;
return convert.to_bytes(input);
-#endif
}
std::u16string UTF8ToUTF16(const std::string& input) {
-#ifdef _MSC_VER
- // Workaround for missing char16_t/char32_t instantiations in MSVC2017
- std::wstring_convert<std::codecvt_utf8_utf16<__int16>, __int16> convert;
- auto tmp_buffer = convert.from_bytes(input);
- return std::u16string(tmp_buffer.cbegin(), tmp_buffer.cend());
-#else
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> convert;
return convert.from_bytes(input);
-#endif
}
#ifdef _WIN32