]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
no changes, just removed _T()s and unnecessary wxUnusedVar()s
[wxWidgets.git] / src / common / docview.cpp
index e308d867c016d9ae5ce405854fd12d13e4a5d06d..3498256d9480df39b18fbfdaee73dd55118b01dd 100644 (file)
@@ -582,10 +582,10 @@ bool wxDocument::DoSaveDocument(const wxString& file)
 {
 #if wxUSE_STD_IOSTREAM
     wxSTD ofstream store(file.mb_str(), wxSTD ios::binary);
-    if (store.fail() || store.bad())
+    if ( !store )
 #else
     wxFileOutputStream store(file);
-    if (store.GetLastError() != wxSTREAM_NO_ERROR)
+    if ( store.GetLastError() != wxSTREAM_NO_ERROR )
 #endif
     {
         wxLogError(_("File \"%s\" could not be opened for writing."), file);
@@ -605,7 +605,7 @@ bool wxDocument::DoOpenDocument(const wxString& file)
 {
 #if wxUSE_STD_IOSTREAM
     wxSTD ifstream store(file.mb_str(), wxSTD ios::binary);
-    if ( store.fail() || store.bad() )
+    if ( !store )
 #else
     wxFileInputStream store(file);
     if (store.GetLastError() != wxSTREAM_NO_ERROR)
@@ -617,7 +617,7 @@ bool wxDocument::DoOpenDocument(const wxString& file)
 
 #if wxUSE_STD_IOSTREAM
     LoadObject(store);
-    if ( store.fail() || store.bad() )
+    if ( !store )
 #else
     int res = LoadObject(store).GetLastError();
     if ( res != wxSTREAM_NO_ERROR && res != wxSTREAM_EOF )
@@ -972,7 +972,7 @@ void wxDocManager::OnFileCloseAll(wxCommandEvent& WXUNUSED(event))
 
 void wxDocManager::OnFileNew(wxCommandEvent& WXUNUSED(event))
 {
-    CreateDocument( wxEmptyString, wxDOC_NEW );
+    CreateNewDocument();
 }
 
 void wxDocManager::OnFileOpen(wxCommandEvent& WXUNUSED(event))