Add wxString::WorstEncodingCase, other various cleanups

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ryan Norton
2004-10-29 21:06:28 +00:00
parent 83bd1fd925
commit 03ff8fda8d
3 changed files with 22 additions and 31 deletions

View File

@@ -1902,7 +1902,7 @@ public:
if (szOut == NULL)
{
// worst case
nRealOutSize = ((nBufSize - 1) << 2)+1 ;
nRealOutSize = wxString::WorstEncodingCase(nBufSize - 1, *this)+1 ;
szBuffer = new char[ nRealOutSize ] ;
}
else
@@ -2079,7 +2079,7 @@ public:
if (buf == NULL)
{
// worst case
n = byteInLen << 1 ;
n = wxString::WorstEncodingCase(byteInLen / SIZEOF_WCHAR_T, *this) + SIZEOF_WCHAR_T;
tbuf = (char*) malloc( n ) ;
}