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.
This commit is contained in:
JosJuice 2017-11-11 14:07:28 +01:00
parent 1e24a5f309
commit 65c1df094f
1 changed files with 1 additions and 5 deletions

View File

@ -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