X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d4edca33b67e61aeb28a8961ce2088c58631b16..6def7a17b01a15e68696a1863d114ecc5554e3d4:/include/wx/filename.h?ds=inline diff --git a/include/wx/filename.h b/include/wx/filename.h index 95cbb18de5..ad9feee7af 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -35,7 +35,6 @@ 3. SameFileAs() function to compare inodes under Unix */ -// ridiculously enough, this will replace DirExists with wxDirExists etc #include "wx/filefn.h" #include "wx/datetime.h" @@ -186,7 +185,7 @@ public: bool IsOk() const { // we're fine if we have the path or the name or if we're a root dir - return m_dirs.size() != 0 || !m_name.IsEmpty() || !m_relative || + return m_dirs.size() != 0 || !m_name.empty() || !m_relative || !m_ext.empty() || m_hasExt; } @@ -367,8 +366,9 @@ public: void RemoveLastDir() { RemoveDir(GetDirCount() - 1); } // Other accessors - void SetExt( const wxString &ext ) { m_ext = ext; m_hasExt = true; } - void SetNoExt() { m_ext = wxEmptyString; m_hasExt = false; } + void SetExt( const wxString &ext ) { m_ext = ext; m_hasExt = !m_ext.empty(); } + void ClearExt() { m_ext = wxEmptyString; m_hasExt = false; } + void SetEmptyExt() { m_ext = wxT(""); m_hasExt = true; } wxString GetExt() const { return m_ext; } bool HasExt() const { return m_hasExt; }