X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/af58844636f51ca9c9350c66de3baf427d3e8646..9b26a198ce442caff6a46196b97d25e60e1193f0:/src/common/file.cpp?ds=inline diff --git a/src/common/file.cpp b/src/common/file.cpp index d4514c5693..1063e45293 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -342,15 +342,15 @@ bool wxFile::Flush() // seek wxFileOffset wxFile::Seek(wxFileOffset ofs, wxSeekMode mode) { - wxASSERT_MSG( IsOpened(), _T("can't seek on closed file") ); + wxASSERT_MSG( IsOpened(), wxT("can't seek on closed file") ); wxCHECK_MSG( ofs != wxInvalidOffset || mode != wxFromStart, wxInvalidOffset, - _T("invalid absolute file offset") ); + wxT("invalid absolute file offset") ); int origin; switch ( mode ) { default: - wxFAIL_MSG(_T("unknown seek origin")); + wxFAIL_MSG(wxT("unknown seek origin")); case wxFromStart: origin = SEEK_SET; @@ -450,14 +450,17 @@ bool wxFile::Eof() const iRc = wxEof(m_fd); #endif // Windows/Unix - if ( iRc == 1) - {} - else if ( iRc == 0 ) + if ( iRc == 0 ) return false; - else if ( iRc == wxInvalidOffset ) + + if ( iRc == wxInvalidOffset ) + { wxLogSysError(_("can't determine if the end of file is reached on descriptor %d"), m_fd); - else - wxFAIL_MSG(_T("invalid eof() return value.")); + } + else if ( iRc != 1 ) + { + wxFAIL_MSG(wxT("invalid eof() return value.")); + } return true; }