diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index ae62191d39..a0061f52ae 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -116,6 +116,7 @@ class WXDLLIMPEXP_BASE wxFileStream : public wxFileInputStream, { public: wxFileStream(const wxString& fileName); + virtual bool IsOk() const; private: DECLARE_NO_COPY_CLASS(wxFileStream) diff --git a/src/common/wfstream.cpp b/src/common/wfstream.cpp index 5bc7cf1ce2..1f1600deff 100644 --- a/src/common/wfstream.cpp +++ b/src/common/wfstream.cpp @@ -107,9 +107,9 @@ wxFileOffset wxFileInputStream::OnSysTell() const return m_file->Tell(); } -bool wxFileInputStream::IsOk() const -{ - return (wxStreamBase::IsOk() && m_file->IsOpened()); +bool wxFileInputStream::IsOk() const +{ + return wxStreamBase::IsOk() && m_file->IsOpened(); } // ---------------------------------------------------------------------------- @@ -183,9 +183,9 @@ wxFileOffset wxFileOutputStream::GetLength() const return m_file->Length(); } -bool wxFileOutputStream::IsOk() const -{ - return (wxStreamBase::IsOk() && m_file->IsOpened()); +bool wxFileOutputStream::IsOk() const +{ + return wxStreamBase::IsOk() && m_file->IsOpened(); } // ---------------------------------------------------------------------------- @@ -225,6 +225,11 @@ wxFileStream::wxFileStream(const wxString& fileName) wxFileOutputStream::m_file = wxFileInputStream::m_file; } +bool wxFileStream::IsOk() const +{ + return wxStreamBase::IsOk() && wxFileInputStream::m_file->IsOpened(); +} + #endif //wxUSE_FILE #if wxUSE_FFILE @@ -300,9 +305,9 @@ wxFileOffset wxFFileInputStream::OnSysTell() const return m_file->Tell(); } -bool wxFFileInputStream::IsOk() const -{ - return (wxStreamBase::IsOk() && m_file->IsOpened()); +bool wxFFileInputStream::IsOk() const +{ + return wxStreamBase::IsOk() && m_file->IsOpened(); } // ---------------------------------------------------------------------------- @@ -386,9 +391,9 @@ wxFileOffset wxFFileOutputStream::GetLength() const return m_file->Length(); } -bool wxFFileOutputStream::IsOk() const -{ - return (wxStreamBase::IsOk() && m_file->IsOpened()); +bool wxFFileOutputStream::IsOk() const +{ + return wxStreamBase::IsOk() && m_file->IsOpened(); } // ----------------------------------------------------------------------------