]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/fs_inet.cpp
Warning fix and source cleaning.
[wxWidgets.git] / src / common / fs_inet.cpp
index 7e9ce0fe0287920e70b4829f3a58a1549f1a8b4d..f2add645833392be0744aa286e97ea5c3a3a20bf 100644 (file)
@@ -84,13 +84,14 @@ static wxString StripProtocolAnchor(const wxString& location)
 
 bool wxInternetFSHandler::CanOpen(const wxString& location)
 {
+#if wxUSE_URL
     wxString p = GetProtocol(location);
     if ((p == wxT("http")) || (p == wxT("ftp")))
     {
         wxURL url(p + wxT(":") + StripProtocolAnchor(location));
         return (url.GetError() == wxURL_NOERR);
     }
-
+#endif
     return false;
 }
 
@@ -98,6 +99,9 @@ bool wxInternetFSHandler::CanOpen(const wxString& location)
 wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs),
                                         const wxString& location)
 {
+#if !wxUSE_URL
+    return NULL;
+#else
     wxString right =
         GetProtocol(location) + wxT(":") + StripProtocolAnchor(location);
 
@@ -130,6 +134,7 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs),
     }
 
     return (wxFSFile*) NULL; // incorrect URL
+#endif
 }