mirror of
https://bitbucket.org/seefoe/src.git
synced 2026-10-12 02:13:43 -04:00
fix more warnings
This commit is contained in:
@@ -41,13 +41,6 @@ bool CConfig::LoadFile(char * file)
|
||||
|
||||
// allocate buffer
|
||||
pConfig = new char[length + 1];
|
||||
|
||||
if (pConfig == NULL)
|
||||
{
|
||||
fclose(fp);
|
||||
fprintf(stderr,"Failed to alloc config buffer length %d",(int32)length);
|
||||
return false;
|
||||
}
|
||||
memset(pConfig,0,length);
|
||||
|
||||
// read data, stripping comments
|
||||
|
||||
@@ -217,12 +217,10 @@ Plat_Unicode::String UTF8ToUnicode(const char *source)
|
||||
Plat_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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user