Use wxStringBuffer[Length] instead of explicit calls to
wxString::get/UngetWriteBuffer. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22191 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -408,8 +408,7 @@ const wxChar* wxGetHomeDir(wxString *pstr)
|
||||
|
||||
wxString strPath;
|
||||
::GetModuleFileName(::GetModuleHandle(NULL),
|
||||
strPath.GetWriteBuf(MAX_PATH), MAX_PATH);
|
||||
strPath.UngetWriteBuf();
|
||||
wxStringBuffer(strPath, MAX_PATH), MAX_PATH);
|
||||
|
||||
// extract the dir name
|
||||
wxSplitPath(strPath, &strDir, NULL, NULL);
|
||||
@@ -593,8 +592,8 @@ bool wxGetEnv(const wxString& var, wxString *value)
|
||||
|
||||
if ( value )
|
||||
{
|
||||
(void)::GetEnvironmentVariable(var, value->GetWriteBuf(dwRet), dwRet);
|
||||
value->UngetWriteBuf();
|
||||
(void)::GetEnvironmentVariable(var, wxStringBuffer(*value, dwRet),
|
||||
dwRet);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
|
Reference in New Issue
Block a user