Remove useless c_str() calls from wxTextFile code
There is no need to call wxString::c_str() just to create another wxString from it.
This commit is contained in:
@@ -75,7 +75,7 @@ bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode Open
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_file.Open(strBufferName.c_str(), FileOpenMode);
|
return m_file.Open(strBufferName, FileOpenMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -267,7 +267,7 @@ bool wxTextFile::OnWrite(wxTextFileType typeNew, const wxMBConv& conv)
|
|||||||
wxTempFile fileTmp(fn.GetFullPath());
|
wxTempFile fileTmp(fn.GetFullPath());
|
||||||
|
|
||||||
if ( !fileTmp.IsOpened() ) {
|
if ( !fileTmp.IsOpened() ) {
|
||||||
wxLogError(_("can't write buffer '%s' to disk."), m_strBufferName.c_str());
|
wxLogError(_("can't write buffer '%s' to disk."), m_strBufferName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user