remove unneeded code

This commit is contained in:
Akash Mozumdar 2018-09-17 19:26:44 -04:00
parent 878e4b443f
commit 50c488f109
2 changed files with 1 additions and 2 deletions

View File

@ -37,7 +37,6 @@ void TextThread::Flush()
sentence = std::wstring(converted, MultiByteToWideChar(status & USING_UTF8 ? CP_UTF8 : 932, 0, buffer.data(), buffer.size(), converted, buffer.size())); sentence = std::wstring(converted, MultiByteToWideChar(status & USING_UTF8 ? CP_UTF8 : 932, 0, buffer.data(), buffer.size(), converted, buffer.size()));
delete[] converted; delete[] converted;
} }
memset(buffer.data(), 0, buffer.size());
buffer.clear(); buffer.clear();
} }
AddSentence(sentence); AddSentence(sentence);

View File

@ -74,7 +74,7 @@ bool ProcessSentence(std::wstring& sentence, const InfoForExtension* miscInfo)
if (buffer[0] == '[') if (buffer[0] == '[')
{ {
wchar_t wbuffer[10000] = {}; wchar_t wbuffer[10000] = {};
MultiByteToWideChar(CP_UTF8, 0, (char*)buffer, -1, wbuffer, 10000); MultiByteToWideChar(CP_UTF8, 0, buffer, -1, wbuffer, 10000);
std::wstring response(wbuffer); std::wstring response(wbuffer);
std::wregex translationFinder(L"\\[\"(.*?)\",[n\"]"); std::wregex translationFinder(L"\\[\"(.*?)\",[n\"]");
std::wsmatch results; std::wsmatch results;