]> git.saurik.com Git - wxWidgets.git/commitdiff
prefer wxFFile to wxFile if both are available, for better performance (see bug ...
authorVáclav Slavík <vslavik@fastmail.fm>
Wed, 13 Jun 2007 20:49:27 +0000 (20:49 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Wed, 13 Jun 2007 20:49:27 +0000 (20:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@46457 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filesys.cpp
src/common/image.cpp

index 4b3bb49c593afc086519d0383b2f73856280b44d..f3ef6a72093ea81883f618f16a517a8c1083c0de 100644 (file)
@@ -215,10 +215,10 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString&
 
     // we need to check whether we can really read from this file, otherwise
     // wxFSFile is not going to work
-#if wxUSE_FILE
-    wxFileInputStream *is = new wxFileInputStream(fullpath);
-#elif wxUSE_FFILE
+#if wxUSE_FFILE
     wxFFileInputStream *is = new wxFFileInputStream(fullpath);
+#elif wxUSE_FILE
+    wxFileInputStream *is = new wxFileInputStream(fullpath);
 #else
 #error One of wxUSE_FILE or wxUSE_FFILE must be set to 1 for wxFSHandler to work
 #endif
index 1c30e71c921b98d79af88c976057f84e18d50b0d..7abe5f9860111b5623cc2f1f66760c11f91eb8c6 100644 (file)
 #define HAS_FILE_STREAMS (wxUSE_STREAMS && (wxUSE_FILE || wxUSE_FFILE))
 
 #if HAS_FILE_STREAMS
-    #if wxUSE_FILE
-        typedef wxFileInputStream wxImageFileInputStream;
-        typedef wxFileOutputStream wxImageFileOutputStream;
-    #elif wxUSE_FFILE
+    #if wxUSE_FFILE
         typedef wxFFileInputStream wxImageFileInputStream;
         typedef wxFFileOutputStream wxImageFileOutputStream;
+    #elif wxUSE_FILE
+        typedef wxFileInputStream wxImageFileInputStream;
+        typedef wxFileOutputStream wxImageFileOutputStream;
     #endif // wxUSE_FILE/wxUSE_FFILE
 #endif // HAS_FILE_STREAMS