]> git.saurik.com Git - wxWidgets.git/commitdiff
wxString(file.fn_str()) doesn't make sense. If just file.fn_str() gives
authorOve Kaaven <ovek@arcticnet.no>
Sat, 24 Jul 1999 06:20:37 +0000 (06:20 +0000)
committerOve Kaaven <ovek@arcticnet.no>
Sat, 24 Jul 1999 06:20:37 +0000 (06:20 +0000)
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

src/common/docview.cpp

index 309ccff463bf954e7ba377ad0d167ac559baa2b2..33cde3d1f2d2eab36c0c280f802101958b01ed23 100644 (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
     {