wxString(file.fn_str()) doesn't make sense. If just file.fn_str() gives

problems, better to use (FNSTRINGCAST file.fn_str())


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3114 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ove Kaaven
1999-07-24 06:20:37 +00:00
parent 24463897d5
commit 11aab0d000

View File

@@ -281,10 +281,10 @@ bool wxDocument::OnSaveDocument(const wxString& file)
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
ofstream store(wxString(file.fn_str()));
ofstream store(FNSTRINGCAST file.fn_str());
if (store.fail() || store.bad())
#else
wxFileOutputStream store(wxString(file.fn_str()));
wxFileOutputStream store(FNSTRINGCAST file.fn_str());
if (store.LastError() != 0)
#endif
{
@@ -317,10 +317,10 @@ bool wxDocument::OnOpenDocument(const wxString& file)
msgTitle = wxString(_("File error"));
#if wxUSE_STD_IOSTREAM
ifstream store(wxString(file.fn_str()));
ifstream store(FNSTRINGCAST file.fn_str());
if (store.fail() || store.bad())
#else
wxFileInputStream store(wxString(file.fn_str()));
wxFileInputStream store(FNSTRINGCAST file.fn_str());
if (store.LastError() != 0)
#endif
{