summaryrefslogtreecommitdiff
path: root/Source/Core/Common/StringUtil.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-11-11 14:07:28 +0100
committerJosJuice <josjuice@gmail.com>2017-11-11 20:30:06 +0100
commit65c1df094f90c8fbc3114b70ea012a494ddafdc1 (patch)
tree30b900eda52f772eb4ff75088207e2f734b53e69 /Source/Core/Common/StringUtil.cpp
parent1e24a5f309b69689e43e5876d26dd6ad2a0b0f67 (diff)
Remove unneeded check in StringUtil::UTF16ToUTF8
No code is relying on this unexplained null byte check, since the only code that calls UTF16ToUTF8 on non-Windows systems is UTF16BEToUTF8, which explicitly strips null bytes.
Diffstat (limited to 'Source/Core/Common/StringUtil.cpp')
-rw-r--r--Source/Core/Common/StringUtil.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/Source/Core/Common/StringUtil.cpp b/Source/Core/Common/StringUtil.cpp
index c904f150da..d4aefefc59 100644
--- a/Source/Core/Common/StringUtil.cpp
+++ b/Source/Core/Common/StringUtil.cpp
@@ -569,11 +569,7 @@ std::string UTF8ToSHIFTJIS(const std::string& input)
std::string UTF16ToUTF8(const std::wstring& input)
{
- std::string result = CodeToUTF8("UTF-16LE", input);
-
- // TODO: why is this needed?
- result.erase(std::remove(result.begin(), result.end(), 0x00), result.end());
- return result;
+ return CodeToUTF8("UTF-16LE", input);
}
#endif