From: Ove Kaaven Date: Sat, 24 Jul 1999 06:20:37 +0000 (+0000) Subject: wxString(file.fn_str()) doesn't make sense. If just file.fn_str() gives X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/11aab0d0005a2dca111b24a7088eb834b26894ed 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 --- diff --git a/src/common/docview.cpp b/src/common/docview.cpp index 309ccff463..33cde3d1f2 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -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 {