remove unnecessary null checks

This commit is contained in:
DarthArgus
2014-10-26 22:53:42 -07:00
parent eb2e7c78d8
commit 594b3a4254
56 changed files with 98 additions and 199 deletions
+5 -6
View File
@@ -228,12 +228,11 @@ Unicode::String UTF8ToUnicode(const char *source)
Unicode::String s = narrowToWide("");
int length = strlen(source) + 1;
UTF16 *buffer = new UTF16[length];
if (buffer != NULL)
{
UTF8_convertToUTF16(const_cast<char *>(source) , buffer, length);
s =buffer;
delete [] buffer;
}
UTF8_convertToUTF16(const_cast<char *>(source) , buffer, length);
s =buffer;
delete [] buffer;
return s;
}