We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
void LanguageFilter::Init() { m_wordList.clear(); File *file = g_theFileSystem->Open_File("langdata.dat", File::READ | File::BINARY); if (file != nullptr) { unichar_t buf[128]; while (Read_Word(file, buf)) { int len = u_strlen(buf); // Get rid of this if (len != 0) { for (int i = 0; i < len; i++) { buf[i] ^= 0x5555; } Utf16String str(buf); Un_Haxor(str); m_wordList[str] = true; } } file->Close(); } }
We can get rid of int len = u_strlen(buf) by having Read_Word return the word count and then use that as len instead.
int len = u_strlen(buf)
Read_Word
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We can get rid of
int len = u_strlen(buf)
by havingRead_Word
return the word count and then use that as len instead.The text was updated successfully, but these errors were encountered: