diff options
| author | 2018-09-22 00:52:38 -0400 | |
|---|---|---|
| committer | 2018-10-02 16:10:20 +0200 | |
| commit | bfe84f06f2de966b68026f5b3f4212fd2ba783b6 (patch) | |
| tree | a5d3e6cbcfd520fde820edf83fbace8c174e9818 /src/common/string_util.h | |
| parent | string_util: remove ShiftJIS/CP1252 conversion function (diff) | |
| download | yuzu-bfe84f06f2de966b68026f5b3f4212fd2ba783b6.tar.gz yuzu-bfe84f06f2de966b68026f5b3f4212fd2ba783b6.tar.xz yuzu-bfe84f06f2de966b68026f5b3f4212fd2ba783b6.zip | |
string_util: remove TString conversion for windows
First of all they are foundamentally broken. As our convention is that std::string is always UTF-8, these functions assume that the multi-byte character version of TString (std::string) from windows is also in UTF-8, which is almost always wrong. We are not going to build multi-byte character build, and even if we do, this dirty work should be handled by frontend framework early.
Diffstat (limited to 'src/common/string_util.h')
| -rw-r--r-- | src/common/string_util.h | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/common/string_util.h b/src/common/string_util.h index 78b558405..32bf6a19c 100644 --- a/src/common/string_util.h +++ b/src/common/string_util.h | |||
| @@ -76,24 +76,6 @@ std::u16string UTF8ToUTF16(const std::string& input); | |||
| 76 | std::string UTF16ToUTF8(const std::wstring& input); | 76 | std::string UTF16ToUTF8(const std::wstring& input); |
| 77 | std::wstring UTF8ToUTF16W(const std::string& str); | 77 | std::wstring UTF8ToUTF16W(const std::string& str); |
| 78 | 78 | ||
| 79 | #ifdef _UNICODE | ||
| 80 | inline std::string TStrToUTF8(const std::wstring& str) { | ||
| 81 | return UTF16ToUTF8(str); | ||
| 82 | } | ||
| 83 | |||
| 84 | inline std::wstring UTF8ToTStr(const std::string& str) { | ||
| 85 | return UTF8ToUTF16W(str); | ||
| 86 | } | ||
| 87 | #else | ||
| 88 | inline std::string TStrToUTF8(const std::string& str) { | ||
| 89 | return str; | ||
| 90 | } | ||
| 91 | |||
| 92 | inline std::string UTF8ToTStr(const std::string& str) { | ||
| 93 | return str; | ||
| 94 | } | ||
| 95 | #endif | ||
| 96 | |||
| 97 | #endif | 79 | #endif |
| 98 | 80 | ||
| 99 | /** | 81 | /** |