fix for Sun CC bug with not calling temporary objects dtor

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13643 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-01-18 20:31:40 +00:00
parent 409d5a5860
commit 2fe0ef8a1e

View File

@ -1474,7 +1474,13 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
wxString wxGetCwd()
{
wxString str;
wxGetWorkingDirectory(wxStringBuffer(str, _MAXPATHLEN), _MAXPATHLEN);
// we can't create wxStringBuffer object inline: Sun CC generates buggy
// code in this case!
{
wxStringBuffer buf(str, _MAXPATHLEN);
wxGetWorkingDirectory(buf, _MAXPATHLEN);
}
return str;
}