diff --git a/src/common/file.cpp b/src/common/file.cpp index 1d28ba4975..1dd7cebdd8 100644 --- a/src/common/file.cpp +++ b/src/common/file.cpp @@ -541,12 +541,12 @@ bool wxTempFile::Commit() m_file.Close(); #ifndef __WXMAC__ - if ( wxFile::Exists(m_strName) && wxRemove(m_strName.fn_str()) != 0 ) { + if ( wxFile::Exists(m_strName) && wxRemove(m_strName) != 0 ) { wxLogSysError(_("can't remove file '%s'"), m_strName.c_str()); return FALSE; } - if ( wxRename(m_strTemp.fn_str(), m_strName.fn_str()) != 0 ) { + if ( wxRename(m_strTemp, m_strName) != 0 ) { wxLogSysError(_("can't commit changes to file '%s'"), m_strName.c_str()); return FALSE; } @@ -569,7 +569,7 @@ void wxTempFile::Discard() { m_file.Close(); #ifndef __WXMAC__ - if ( wxRemove(m_strTemp.fn_str()) != 0 ) + if ( wxRemove(m_strTemp) != 0 ) wxLogSysError(_("can't remove temporary file '%s'"), m_strTemp.c_str()); #else if ( remove( wxUnix2MacFilename(m_strTemp.fn_str())) != 0 ) diff --git a/src/common/fileconf.cpp b/src/common/fileconf.cpp index 2f8bde4ad6..9ded85661c 100644 --- a/src/common/fileconf.cpp +++ b/src/common/fileconf.cpp @@ -881,7 +881,7 @@ bool wxFileConfig::DeleteAll() { CleanUp(); - if ( wxRemove(m_strLocalFile.fn_str()) == -1 ) + if ( wxRemove(m_strLocalFile) == -1 ) wxLogSysError(_("can't delete user configuration file '%s'"), m_strLocalFile.c_str()); m_strLocalFile = m_strGlobalFile = wxT(""); diff --git a/src/common/resource.cpp b/src/common/resource.cpp index 90043672a6..fec430274d 100644 --- a/src/common/resource.cpp +++ b/src/common/resource.cpp @@ -230,7 +230,7 @@ bool wxResourceTable::ParseResourceFile(const wxString& filename) #ifdef __WXMAC__ FILE *fd = fopen(wxUnix2MacFilename(filename.fn_str()), "r"); #else - FILE *fd = wxFopen(filename.fn_str(), _T("r")); + FILE *fd = wxFopen(filename, _T("r")); #endif if (!fd) return FALSE; @@ -2779,7 +2779,7 @@ bool wxResourceParseIncludeFile(const wxString& f, wxResourceTable *table) if (!table) table = wxDefaultResourceTable; - FILE *fd = wxFopen(f.fn_str(), _T("r")); + FILE *fd = wxFopen(f, _T("r")); if (!fd) { return FALSE; diff --git a/src/common/wxexpr.cpp b/src/common/wxexpr.cpp index 56f4ea458a..2abeffce01 100644 --- a/src/common/wxexpr.cpp +++ b/src/common/wxexpr.cpp @@ -992,7 +992,7 @@ bool wxExprDatabase::Read(const wxString& filename) { noErrors = 0; - FILE *f = wxFopen(filename.fn_str(), _T("r")); + FILE *f = wxFopen(filename, _T("r")); if (f) { thewxExprDatabase = this; @@ -1024,7 +1024,7 @@ bool wxExprDatabase::ReadFromString(const wxString& buffer) bool wxExprDatabase::Write(const wxString& fileName) { - FILE *stream = wxFopen( fileName.fn_str(), _T("w+")); + FILE *stream = wxFopen( fileName, _T("w+")); if (!stream) return FALSE;