From d59c6c5add9dd6b44560e00d73169a540d57d396 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 13 Feb 2016 13:44:12 +0100 Subject: [PATCH] Remove useless c_str() calls from wxTextFile code There is no need to call wxString::c_str() just to create another wxString from it. --- src/common/textfile.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/textfile.cpp b/src/common/textfile.cpp index 67983e6a99..ee90f138d4 100644 --- a/src/common/textfile.cpp +++ b/src/common/textfile.cpp @@ -75,7 +75,7 @@ bool wxTextFile::OnOpen(const wxString &strBufferName, wxTextBufferOpenMode Open 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()); 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; }