]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix for platforms where 64-bit value support is not implemented in switch/case statem...
authorWłodzimierz Skiba <abx@abx.art.pl>
Fri, 15 Oct 2004 08:13:09 +0000 (08:13 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Fri, 15 Oct 2004 08:13:09 +0000 (08:13 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/file.cpp

index 60e204f0a23ca62faecafe723a3d193d5a00214f..07ad8170567cebe9b306cf0ef5defd46539b3fda 100644 (file)
@@ -449,20 +449,14 @@ bool wxFile::Eof() const
     iRc = wxEof(m_fd);
 #endif // Windows/Unix
 
-    switch ( iRc ) {
-        case 1:
-            break;
-
-        case 0:
-            return false;
-
-        case wxInvalidOffset:
-            wxLogSysError(_("can't determine if the end of file is reached on descriptor %d"), m_fd);
-                break;
-
-        default:
-            wxFAIL_MSG(_("invalid eof() return value."));
-    }
+    if ( iRc == 1)
+        {}
+    else if ( iRc == 0 )
+        return false;
+    else if ( iRc == wxInvalidOffset )
+        wxLogSysError(_("can't determine if the end of file is reached on descriptor %d"), m_fd);
+    else
+        wxFAIL_MSG(_("invalid eof() return value."));
 
     return true;
 }