X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fb96947585c9b133775f58699a1f62cc664a23fe..5fd588d2298a44428ac66bef1e4d9fc73e18d4fd:/include/wx/filename.h diff --git a/include/wx/filename.h b/include/wx/filename.h index 64a48aa5ed..38e6645e06 100644 --- a/include/wx/filename.h +++ b/include/wx/filename.h @@ -12,7 +12,7 @@ #ifndef _WX_FILENAME_H_ #define _WX_FILENAME_H_ -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(__APPLE__) #pragma interface "filename.h" #endif @@ -274,14 +274,21 @@ public: // Comparison - // compares with the rules of this platform - bool SameAs(const wxFileName &filepath, - wxPathFormat format = wxPATH_NATIVE); - - // uses the current platform settings - bool operator==(const wxFileName& filename) { return SameAs(filename); } - bool operator==(const wxString& filename) - { return *this == wxFileName(filename); } + // compares with the rules of the given platforms format + bool SameAs(const wxFileName& filepath, + wxPathFormat format = wxPATH_NATIVE) const; + + // compare with another filename object + bool operator==(const wxFileName& filename) const + { return SameAs(filename); } + bool operator!=(const wxFileName& filename) const + { return !SameAs(filename); } + + // compare with a filename string interpreted as a native file name + bool operator==(const wxString& filename) const + { return SameAs(wxFileName(filename)); } + bool operator!=(const wxString& filename) const + { return !SameAs(wxFileName(filename)); } // are the file names of this type cases sensitive? static bool IsCaseSensitive( wxPathFormat format = wxPATH_NATIVE );