X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c707d82e82cb8c0d52284c5d48d941e891f91872..abe0903cd4a16c6d8f50a3263d601fc718038c6d:/src/common/filesys.cpp diff --git a/src/common/filesys.cpp b/src/common/filesys.cpp index 65fe27f61e..9f5a7c9a24 100644 --- a/src/common/filesys.cpp +++ b/src/common/filesys.cpp @@ -255,7 +255,7 @@ wxFSFile* wxLocalFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), const wxString& #else #error One of wxUSE_FILE or wxUSE_FFILE must be set to 1 for wxFSHandler to work #endif - if ( !is->Ok() ) + if ( !is->IsOk() ) { delete is; return NULL; @@ -355,7 +355,7 @@ void wxFileSystem::ChangePathTo(const wxString& location, bool is_dir) if (is_dir) { - if (m_Path.length() > 0 && m_Path.Last() != wxT('/') && m_Path.Last() != wxT(':')) + if (!m_Path.empty() && m_Path.Last() != wxT('/') && m_Path.Last() != wxT(':')) m_Path << wxT('/'); } @@ -639,7 +639,7 @@ wxFileName wxFileSystem::URLToFileName(const wxString& url) // file urls either start with a forward slash (local harddisk), // otherwise they have a servername/sharename notation, // which only exists on msw and corresponds to a unc - if ( path[0u] == wxT('/') && path [1u] != wxT('/')) + if ( path.length() > 1 && (path[0u] == wxT('/') && path [1u] != wxT('/')) ) { path = path.Mid(1); }